Skip to content
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

Merged
merged 2 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions codestyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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[\\/]" />
Copy link
Member

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:

Copy link
Member

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

Copy link
Contributor Author

@AlbericByte AlbericByte Dec 12, 2023

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

<suppress checks="SingleSpaceSeparator" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="LocalVariableName" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="AvoidStaticImport" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="ImportOrder" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="RedundantImport" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="UnusedImports" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="EmptyStatement" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="Regexp" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="WhitespaceAfter" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="ModifierOrder" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="RedundantModifier" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="OneStatementPerLine" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="RightCurly" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="MethodName" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="NeedBraces" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="WhitespaceAround" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="Header" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="EmptyLineSeparator" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="LeftCurly" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="Indentation" files="[\\/]target[\\/]generated-sources[\\/]" />
<suppress checks="ConstantName" files="[\\/]target[\\/]generated-sources[\\/]" />

<suppress checks="Header" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="NeedBraces" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="UnusedImports" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="AvoidStarImport" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="FileTabCharacter" files="[\\/]target[\\/]generated-test-sources[\\/]" />

<suppress checks="ConstantName" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="WhitespaceAfter" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="WhitespaceAround" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="ParenPad" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="SingleSpaceSeparator" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="NoWhitespaceBefore" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="NoWhitespaceAfter" files="[\\/]target[\\/]generated-test-sources[\\/]" />

<suppress checks="LeftCurly" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="RightCurly" files="[\\/]target[\\/]generated-test-sources[\\/]" />

<suppress checks="Indentation" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="ModifierOrder" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="RedundantImport" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="OneStatementPerLine" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="ImportOrder" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="EmptyLineSeparator" files="[\\/]target[\\/]generated-test-sources[\\/]" />

<suppress checks="Indentation" files="ProtoTestEventWrapper.java" />
<suppress checks="Regexp" id="argumentLineBreaking" files="ProtoTestEventWrapper.java" />
<suppress checks="[a-zA-Z0-9]*" files="ProtoTestEventWrapper.java" />
Expand All @@ -56,7 +83,6 @@
<suppress checks="ConstantName" files="Author" />
<suppress checks="ConstantName" files="Book" />

<suppress checks="OneStatementPerLine" files="[\\/]target[\\/]generated-test-sources[\\/]" />

<!-- extendedset is a fork of Alessandro Colantonio's CONCISE (COmpressed 'N' Composable Integer SEt) repository
and licensed to ASF under a CLA is not true. -->
Expand All @@ -67,7 +93,5 @@
<!-- See https://github.com/checkstyle/checkstyle/issues/5510 and the ImportOrder definition in checkstyle.xml -->
<suppress checks="ImportOrder" message="^'java\..*'.*" />

<suppress checks="ImportOrder" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="EmptyLineSeparator" files="[\\/]target[\\/]generated-test-sources[\\/]" />
<suppress checks="AvoidStaticImport" files="[\\/]src[\\/](test)[\\/]"/>
</suppressions>
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2108,9 +2108,14 @@
<exclude>**/test/resources/**/*</exclude> <!-- test data for "old" ITs. -->
<exclude>**/docker/client_tls/*</exclude> <!-- generated files for "old" ITs. -->
<exclude>resources/data/**/*</exclude> <!-- test data for "new" ITs. -->
<exclude>**/derby.log</exclude>
<exclude>**/jvm.config</exclude>
<exclude>**/*.avsc</exclude>
<exclude>**/*.png</exclude>
Copy link
Contributor

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 ?

<exclude>**/*.log</exclude>
<exclude>**/*.jpg</exclude>
<exclude>**/*.gif</exclude>
<exclude>examples/quickstart/protobuf/metrics.desc</exclude>
<exclude>examples/var/sv/.lock</exclude>
<exclude>**/*.iml</exclude>
<exclude>**/*.json</exclude>
<exclude>**/*.parq</exclude>
Expand Down