-
Notifications
You must be signed in to change notification settings - Fork 4
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 config #14
Conversation
* Add Checkstyle config to make sure we are following the same style convention * Fix checkstyle issues in the current code base
5b993e3
to
5622b28
Compare
- name: Upload checkstyle report | ||
uses: actions/upload-artifact@v3 | ||
if: success() || failure() | ||
with: | ||
name: checkstyle-report | ||
path: build/checkstyle/*.html |
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.
I would like to display checkstyle report by using Push Checkstyle Report action but failed due to the Error: HttpError: Resource not accessible by integration
issue...
configProperties = ['checkstyleConfigDir': "$checkstyleConfigDir"] | ||
ignoreFailures = true | ||
reportsDir = project.file('build/checkstyle') | ||
toolVersion = '9.3' |
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.
The latest version to support Java 8 is 9.x (10.x only supports Java 11)
@@ -17,12 +17,14 @@ jobs: | |||
java-version: ${{ matrix.java }} | |||
architecture: x64 | |||
- uses: actions/checkout@v3 | |||
|
|||
with: | |||
ref: ${{ github.event.pull_request.head.sha }} |
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.
Used ${{ github.event.pull_request.head.sha }}
according to the suggestion on Push Checkstyle Report
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" | ||
"https://checkstyle.org/dtds/configuration_1_3.dtd"> | ||
|
||
<module name="Checker"> |
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.
I have copied this file from Armeria but removed checks related to Javadoc:
<module name="JavadocType">
<property name="scope" value="protected"/>
<property name="excludeScope" value="package"/>
</module>
<module name="JavadocMethod">
<property name="accessModifiers" value="protected, public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
</module>
<module name="MissingJavadocMethod">
<property name="scope" value="protected"/>
</module>
<module name="MissingJavadocPackage"/>
<module name="MissingJavadocType"/>
<module name="JavadocParagraph"/>
<module name="JavadocTagContinuationIndentation"/>
Motivation:
Modifications:
pull_request_target
to workaround Github Action permission issueResult: