-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix rat and checkstyle issue #15530
fix rat and checkstyle issue #15530
Conversation
The original issue is not re-produced on the master branch, but got a lots of checkstyle problems when running the command
The checkstyle problems are all for files in the generated-source directory of But I would like to suggest using global match to exclude all checks for the generated source files like the following instead of adding supression rules one by one to the supression file.
|
@@ -29,23 +29,50 @@ | |||
<!-- Code copied from TestNG to apply a bugfix --> | |||
<suppress checks="AvoidStaticImport" files="[\\/]org[\\/]testng[\\/]" /> | |||
|
|||
<suppress checks="LocalFinalVariableName" files="[\\/]target[\\/]generated-sources[\\/]" /> |
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.
Remove all rules from this file for generated-source and generated-test-sources and add the following two rules:
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 URL in Line 27 of this file is out of date. Please also change it to: https://checkstyle.org/filters/suppressionfilter.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.
@FrankChen021 good catch, fixed, Thanks
This problem is only re-produced when running command 'mvn clean package install'. I don't know why this happens. We can investigate this separately. For GHA, I think there's no need to make changes now until we find out the root cause why the checkstyle runs twice under the 'package install' command |
<exclude>**/jvm.config</exclude> | ||
<exclude>**/*.avsc</exclude> | ||
<exclude>**/*.png</exclude> |
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.
Why is this change required ?
Fixes #15124
Description
Building Druid with the below command on master/v27.0 branches:
mvn clean package install -DskipTests -Pdist -Prat
the build failed with the below error.
Update the following configuration to fix this issue:
Fixed the bug ...
Release note
Key changed/added classes in this PR
checkstyle-suppressions.xml
pom.xml
This PR has: