Skip to content

Pull #18629: Add EqualityRulesRecipes #18627 #18625 #18622#18629

Closed
Pankraz76 wants to merge 1 commit into
checkstyle:masterfrom
Pankraz76:fix-CodeCleanup-refasterrules
Closed

Pull #18629: Add EqualityRulesRecipes #18627 #18625 #18622#18629
Pankraz76 wants to merge 1 commit into
checkstyle:masterfrom
Pankraz76:fix-CodeCleanup-refasterrules

Conversation

@Pankraz76

@Pankraz76 Pankraz76 commented Jan 12, 2026

Copy link
Copy Markdown

Pull #18629: Add EqualityRulesRecipes #18627 #18625 #18622

https://error-prone.picnic.tech/refasterrules/EqualityRules/

item

[WARNING] There were problems parsing .ci/error-prone-check.groovy
[WARNING] There were problems parsing .ci/pitest-survival-check-xml.groovy
[INFO] Running recipe(s)...
[INFO] Printing available datatables to: target/rewrite/datatables/2026-01-12_22-24-15-418
[WARNING] The recipe produced 4 warning(s). Please report this to the recipe author.
[WARNING] Changes have been made to src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java by:
[WARNING]     tech.picnic.errorprone.refasterrules.EqualityRulesRecipes
[WARNING]         tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EnumReferenceEqualityRecipe
[WARNING] Changes have been made to src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressionCommentFilter.java by:
[WARNING]     tech.picnic.errorprone.refasterrules.EqualityRulesRecipes
[WARNING]         tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EnumReferenceEqualityRecipe
[WARNING] Changes have been made to src/main/java/com/puppycrawl/tools/checkstyle/api/Violation.java by:
[WARNING]     tech.picnic.errorprone.refasterrules.EqualityRulesRecipes
[WARNING]         tech.picnic.errorprone.refasterrules.EqualityRulesRecipes$EnumReferenceEqualityRecipe
[WARNING] Please review and commit the results.
[WARNING] Estimate time saved: 15m

@Pankraz76 Pankraz76 changed the title Pull #18608: Add EqualityRulesRecipes #18627 #18625 #18622 Pull #18608: Add EqualityRulesRecipes #18627 #18625 #18622 #18599 Jan 12, 2026
@Pankraz76 Pankraz76 changed the title Pull #18608: Add EqualityRulesRecipes #18627 #18625 #18622 #18599 Pull #18629: Add EqualityRulesRecipes #18627 #18625 #18622 Jan 12, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
@Pankraz76 Pankraz76 force-pushed the fix-CodeCleanup-refasterrules branch from f18b656 to d9cf25b Compare January 12, 2026 21:28
@Pankraz76

Copy link
Copy Markdown
Author

kindly request your call on this.

@VinishaWagh @abhayrajjais01 @Brijeshthummar02 @romani

@Pankraz76 Pankraz76 marked this pull request as ready for review January 12, 2026 21:30
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 12, 2026

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Items

&& Objects.equals(columnCharIndex, violation.columnCharIndex)
&& Objects.equals(tokenType, violation.tokenType)
&& Objects.equals(severityLevel, violation.severityLevel)
&& severityLevel == violation.severityLevel

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is generated code.
Can we configure rule to skip "equals" ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats wrong? we should ignore generated code, not some rule in general.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code is code. if its not changing any time we should fix it once.

Comment thread .circleci/config.yml
image-name: "cimg/openjdk:21.0"
command: "./.ci/validation.sh openrewrite-recipes"
no_output_timeout: 15m
no_output_timeout: 25m

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one locally takes a lot more meaning recipe is big composite.

Too long with no output (exceeded 15m0s): context deadline exceeded

the build takes 1h at least so having a few mins extra is no big deal.

There is only one option to have weak and broken code. Because of this we want to invest some time. I can not change it its no big deal to wait a little extra.

@Pankraz76 Pankraz76 force-pushed the fix-CodeCleanup-refasterrules branch from dcabe12 to 47bb6aa Compare January 13, 2026 12:28
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 13, 2026
@Pankraz76 Pankraz76 force-pushed the fix-CodeCleanup-refasterrules branch from 47bb6aa to bca1ecc Compare January 13, 2026 12:29
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 13, 2026
@Pankraz76 Pankraz76 force-pushed the fix-CodeCleanup-refasterrules branch from bca1ecc to 8afabce Compare January 13, 2026 12:32
@Pankraz76

Copy link
Copy Markdown
Author

item:

<problem_class id="RedundantSuppression" severity="ERROR" attribute_key="ERRORS_ATTRIBUTES">Redundant suppression</problem_class>

assuming we can remove it now?

Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 13, 2026
@Pankraz76 Pankraz76 force-pushed the fix-CodeCleanup-refasterrules branch from 8afabce to 84746b6 Compare January 13, 2026 13:20
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 13, 2026
@Pankraz76 Pankraz76 force-pushed the fix-CodeCleanup-refasterrules branch from 84746b6 to 529077e Compare January 13, 2026 13:31
@Pankraz76 Pankraz76 force-pushed the fix-CodeCleanup-refasterrules branch from 16161ff to 60e15f3 Compare January 15, 2026 13:46
@Pankraz76 Pankraz76 force-pushed the fix-CodeCleanup-refasterrules branch from 60e15f3 to 52d0e96 Compare January 16, 2026 09:41
@rickie

rickie commented Jan 16, 2026

Copy link
Copy Markdown
Contributor

@rickie is this some bug? or it the recipe only changing enum?

You can simply look at either the OpenRewrite or Error Prone Support docs what is happening. If you're applying something on a codebase, it sounds like a good practice to actually check what is happening before opening a PR :).

For the rules you're applying, see: https://error-prone.picnic.tech/refasterrules/EqualityRules/.

@Pankraz76

Copy link
Copy Markdown
Author

now ci showing less error.

Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 20, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 20, 2026
Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 20, 2026
@Pankraz76 Pankraz76 marked this pull request as ready for review January 20, 2026 12:35
@Pankraz76 Pankraz76 force-pushed the fix-CodeCleanup-refasterrules branch 2 times, most recently from c3b89c1 to 0467f26 Compare January 21, 2026 17:34
@Pankraz76 Pankraz76 force-pushed the fix-CodeCleanup-refasterrules branch from 0467f26 to cc15224 Compare January 22, 2026 17:12

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need activation of this later on in different way

@romani romani closed this Jan 22, 2026
@Pankraz76

Copy link
Copy Markdown
Author

what you mean? outcome will be the same if code keeps violating?

Pankraz76 pushed a commit to Pankraz76/checkstyle that referenced this pull request Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants