- changed status to resolved
Update Checkstyle rules
Following the discussions on our mailing list and in the comments of issue #86, we should adjust some of the rules:
- Right Curly Placement: change to "same line" (more compact space for many else ifs when it is on the same line)
- Missing Switch Default: disable (in our case usually the default case is to do nothing, which would lead to many empty default statements)
- Visibility Modifier: check "protectedAllowed" (it's a big debate about strict encapsulation, but a compromise between encapsulation and cleaner/less code can be achieved if we allow it. Regardless, protected fields need to have a javadoc comment, which helps "users" to see their intention).
Comments (9)
-
reporter -
reporter -
assigned issue to
-
assigned issue to
-
reporter - changed status to open
Update the rules to the following:
- Allow to mention undeclared runtime exceptions in javadoc for the Method Javadoc rule
- Allow to disable Checkstyle through comments completely
-
reporter - changed status to resolved
Resolved issue
#108again: Added rules as per request.To disable checkstyle completely use:
To disable temporarily: // CHECKSTYLE:OFF <reason>
To enable it again: // CHECKSTYLE:ON
→ <<cset c60a53636ded>>
-
reporter References issue
#108: Changed severity of "Magic Number" rule to info. There is no one solution to do this.This way, it is not considered a problem, but it can help a developer identify potential refactoring cases where it makes sense to create a constant.
→ <<cset 291056480eb9>>
-
reporter References issue
#108: Changed severity of "Magic Number" rule to info. There is no one solution to do this.This way, it is not considered a problem, but it can help a developer identify potential refactoring cases where it makes sense to create a constant.
(previous commit contained wrong changes)
→ <<cset 1578fa5d8f75>>
-
reporter References issue
#108: Added max line length to Left Curly Bracket Placement rule to properly detect problems.→ <<cset ef05f74e6433>>
-
reporter References issue
#108: Disabled ignoring white space around colon of enhanced for loop.→ <<cset 3a1f6ca095be>>
-
reporter References
#108: Changes the AbstractClassName rule to ignore the name of classes, i.e., abstract classes that don't start with "Abstract" are not a problem anymore.→ <<cset 0605285ca721>>
- Log in to comment
Resolved issue
#108: Changed Checkstyle rules as per issue description.→ <<cset 64121a55cafc>>