-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add checkstyle and javaformat plugins #16
Conversation
19b637a
to
bc6b809
Compare
c87aa3b
to
819a542
Compare
<module name="io.spring.javaformat.checkstyle.SpringChecks"> | ||
<property name="excludes" value="io.spring.javaformat.checkstyle.check.SpringHeaderCheck" /> | ||
<property name="excludes" value="com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocPackageCheck" /> | ||
<property name="excludes" value="com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck" /> |
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.
According to the failure in PR build we also need add this exclusion yet: com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck
apply from: "${rootDir}/publish-maven.gradle" | ||
apply from: "${rootDir}/gradle/checkstyle-conventions.gradle" |
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.
Since our checkstyle-conventions.gradle
is already short enough I don't see a reason in the separate file.
I also wonder why it still fails even if we have that ignoreFailures = true
...
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.
If that's too much, Chris, I can merge this and we can investigate in the separate issues/PRs.
Thanks
<property name="headerFile" value="${config_loc}/checkstyle-header.txt"/> | ||
<property name="fileExtensions" value="java"/> | ||
<module name="com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderCheck"> | ||
<property name="headerFile" value="${config_loc}/checkstyle-header.txt" /> |
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.
According to this issue: spring-io/spring-javaformat#303, our file must be this: https://github.com/spring-io/spring-javaformat/blob/main/spring-javaformat/spring-javaformat-checkstyle/src/main/resources/io/spring/javaformat/checkstyle/check/header-apache2.txt.
I wonder why it is not by default there in SpringChecks
...
So, we would not need to manage that file, but rather rely in whatever Javaformat provides for us 🤷
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.
Actually it does that: spring-io/spring-javaformat#70.
So, never mind: merging and moving on with that locally.
Will let you know with a fresh PR.
Thanks
Merged as 836708f |
Pull request was closed
Points of Interest
./gradlew format
on commit 2ignoreFailures = true
but the report still goes out when we build so as to not fall into the "out of sight, out of mind" trap.TODO
COMMITTER REQUESTS
I have manicured the commits into the 2 divisible units that I think make sense to have in the repo for history
Please and thank you.