-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: change checkstyle to google code format, plus adding spotless #1121
build: change checkstyle to google code format, plus adding spotless #1121
Conversation
We are regularly fighting with codestyles in pullrequests, which is annoying to the contributors, as well as the maintainers. There are tools out there, like spotless, which can automate those processes. We could define an own codestyle, but in fact there is already one widely used codestyle from google (google java format). There are plugins to help us within intellij and vscode to follow this code style. Hence the overall experience can improve by switching to this defitinion. Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems.. fine? No question from me that style should be enforced by robots.
From the slack thread, I expected the rule changes to be more significant. Is the real problem here "The checkstyle that we had before is under-specified and we need to use more modules; Also... add spotless plugin"?
The check style changes are more related to be fact that i wanted to use spotless to ease the pain. But our check style configuration was not compatible with the default settings. As I favor simplicity over custom specification, I thought it is easier to migrate to google check style and a adapt the full java code Format configuration, rather than making spotless work with our current check style config. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Make config work well w/ the auto enforcer" works for me as a rationale. Thanks so much!
61112ba
to
fefce1b
Compare
Thanks so much for adding this! |
fefce1b
to
871c825
Compare
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
871c825
to
b820457
Compare
open-feature/java-sdk#1264 - sibling pr for java-sdk |
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
added a section, with a detailed explanation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a vscode user, thanks so much! ❤️
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
We regularly fight with code styles in pull requests, which is annoying to both the contributors and the maintainers.
There are tools out there, like Spotless, that can automate those processes. We could define our code style, but there is already one widely used code style from Google (Google Java format).
Existing plugins help us follow this code style within IntelliJ and Visual Studio Code. Switching to this definition can improve the overall experience.
This supersedes the pull request with
.editorconfig
notes
Disclaimer
This pull request should be used to discuss this; most people do not have significant opinions regarding code styles as long as there are tools to enforce them. Now we have a maven target,
spotless:apply
, which will inform you about violations and fix them.