-
Notifications
You must be signed in to change notification settings - Fork 24
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
Adds checkstyles to project #48
Conversation
This commit configures in the Puppycrawl checkstyle with the Spring JavaFormat. To avoid the intrusive nature of such a change, the spring-grpc-core module is the only one to have the checkstyles applied. I will handle the other modules as time permits. Signed-off-by: Chris Bono <[email protected]>
@@ -10,6 +10,13 @@ Before submitting a PR, please run the following commands to ensure proper forma | |||
|
|||
The `-Pjavadoc` is a profile that enables Javadoc processing so as to avoid a long build time when developing. | |||
|
|||
<dl><dt><strong>📌 NOTE</strong></dt><dd> |
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.
Is this auto-generated from contribution-guidelines.adoc?
<option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND"> | ||
<value/> | ||
</option> | ||
<option name="IMPORT_LAYOUT_TABLE"> |
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.
These import order are in line w/ the ones in the checkstyle which allows us to easily optmize imports from w/in IDEA and have them match the checkstyles.
I am sure there is something similar for other editors. I created a wiki page that tells how to do this for IDEA. W/ a TODO section for other editors.
@@ -438,6 +488,20 @@ | |||
<type>pom</type> | |||
<scope>import</scope> | |||
</dependency> | |||
<dependency> |
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.
These were required as the checkstyle enforce AssertJ over Junit assertEquals
<property name="format" value="\.toLowerCase\(\)"/> | ||
<property name="maximum" value="0"/> | ||
<property name="message" | ||
value="String.toLowerCase() should be String.toLowerCase(Locale.ROOT)"/> |
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.
Here is a bonus for the prevention of the toLower|upperCase
w/ no locale CVE.
Sigh. I hate these rules. I guess it’s inevitable they will get in here eventually though. |
I too have mixed feelings. I end up "accepting" consistency though. 🙁 Thanks for the review and merge. |
This commit configures in the Puppycrawl checkstyle with the Spring JavaFormat.
To avoid the intrusive nature of such a change, the spring-grpc-core module is the only one to have the checkstyles applied. I will handle the other modules as time permits.