Add checkstyle configuration based on Google Java style#34
Add checkstyle configuration based on Google Java style#34chris-allan merged 4 commits intoglencoesoftware:masterfrom
Conversation
kkoz
left a comment
There was a problem hiding this comment.
Just a couple wording suggestions. Otherwise looks good
chris-allan
left a comment
There was a problem hiding this comment.
I'm fully supportive of the checkstyle configuration. I think my only issue with this is the construction of the commits and how/if we attempt to correctly utilize git-blame-ignore-refs.
Do you have thoughts on that already, @sbesson?
|
Thanks @chris-allan, a The the current commit organisation was made with reviewing in mind to simplify the reversal of individual rules if needed. If we all agree on the content, these could be consolidated into four commits and this branch updated (via force push) as follows:
If we'd rather not force-push, I would add all commits a5221d0 up to ff26161 to |
|
Let's go with the force push and see how things look. |
3e39dba to
0a40420
Compare
See https://checkstyle.org/google_style.html Add the checkstyle plugin to the Gradle build Set default checkstyle severity to error
- use default indentation rules, see https://checkstyle.sourceforge.io/checks/misc/indentation.html - use default MemberName and ParameterName format, see https://checkstyle.sourceforge.io/checks/naming/membername.html and https://checkstyle.sourceforge.io/checks/naming/parametername.html - allow up to 4 consecutive capital letters, see https://checkstyle.sourceforge.io/checks/naming/abbreviationaswordinname.html
- fix package and import errors - fix whitespace errors - fix Javadoc errors - fix variable name errors - fix indentation errors - fix curly braces errors - fix errors by calling constants static final - fix long line errors - move operators to a newline - fix maximum distance between variable declaration and usage
|
Took several force pushes but the diff between the previous history and the new history with squashed commits and the |
Fixes #33
24ca578 adds the
checkstyleplugin and the Google Java style configuration for Google Java style from https://checkstyle.org/google_style.html.cacb96e, cd75d5c and 1a4a5e4 make amendments this configuration to:
1bead65 sets the severity to
errorso that future violations fail the Gradle buildAll other commits update the
omero-zarr-pixel-bufferimplementation to comply with the style configuration. Most of these updates are fairly standard and should be non controversial (indentation, import ordering, camel-case style). There are a few styling rules that differ from other repositories e.g. the requirement to not have operators like||at the end of a line. Leaving reviewers to establish whether it would be preferable to relax the rules instead of fixing the code.