| Summary: | Add support for conditional checkstyle off with @SuppressWarnings | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Stephane Begaudeau <stephane.begaudeau> |
| Component: | Releng | Assignee: | Pierre-Charles David <pierre-charles.david> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | pierre-charles.david |
| Version: | 4.1.1 | Keywords: | triaged |
| Target Milestone: | 5.0.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/88169 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7e06882c5ef6c062273e93bdba6319be0be2aac4 |
||
| Whiteboard: | |||
Moving to 5.0; we'll probably need to upgrade the version of CheckStyle we use when we start to really use Java 8-specific features, so it will be a good opportunity to review and improve our CheckStyle profile, and this point could be part of it. New Gerrit change created: https://git.eclipse.org/r/88169 Gerrit change https://git.eclipse.org/r/88169 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7e06882c5ef6c062273e93bdba6319be0be2aac4 I suppose this can be closed? Closing this issue since it has been merged Available in Sirius 5.0.0, see https://wiki.eclipse.org/Sirius/5.0.0 for details. |
Update the checkstyle configuration to support the conditional removal of checkstyle errors. Instead of this: // CHECKSTYLE:OFF ... // CHECKSTYLE:ON We could thus use: @SuppressWarnings({ "checkstyle:multiplestringliterals" }) public final class GapPatternGenerator { ... } It allows the removal of the validation of specific checkstyle errors on a specific Java scope (class, method, field, etc) while keeping all the other kind of check activated. See: http://checkstyle.sourceforge.net/config_annotation.html#SuppressWarnings#SuppressWarningsHolder