Issue #18673: organised recipes#18791
Issue #18673: organised recipes#18791Anushreebasics wants to merge 1 commit intocheckstyle:masterfrom
Conversation
cda343e to
5787beb
Compare
| - tech.picnic.errorprone.refasterrules.StreamRulesRecipes | ||
| - tech.picnic.errorprone.refasterrules.TimeRulesRecipes | ||
| --- | ||
|
|
|
kindly consider to pull this afterwards: |
|
@Pankraz76 why have you changed other files apart from rewrite.yml? |
13b3282 to
c10440b
Compare
because i have added all the recipes it seems you just doing a reorg. |
|
@Anushreebasics , please resovle conflict, we did split. |
|
how can the pipeline be red? you trying to patch but actually you just mimic the dryRun feature of rewrite but going for the feature envy reimplementing rewrite. This makes no sense and is not how its supposed to be done @romani as seen here.... |
|
@Anushreebasics , can you please always have single commit in PRs. |
had same idea. you can squash merge as well. consider adding the squash hint to readme. also then add simple CI job to fail CI if more then 1 commit in total right, like the no merge commits stuff count == 1 is very simple condition to check and fail. |
|
git reset --soft $(git merge-base master HEAD) |
4153624 to
76218ec
Compare
| - org.openrewrite.staticanalysis.CommonStaticAnalysis | ||
| # individual recipes | ||
| - org.openrewrite.staticanalysis.CommonStaticAnalysis |
| # - org.openrewrite.staticanalysis.ChainStringBuilderAppendCalls | ||
| # - org.openrewrite.staticanalysis.ClassUnnecessaryModifier | ||
| # - org.openrewrite.staticanalysis.CloseResource | ||
| # - org.openrewrite.staticanalysis.CommonStaticAnalysis |
| description: | | ||
| Resolve common static analysis issues (also known as SAST issues). | ||
| recipeList: | ||
| # The following recipes are available but not currently enabled. Uncomment to enable as needed. |
There was a problem hiding this comment.
please create new issue and put in comment "until #xxxx "
we will investigate each rules separately to make decision on permanent suppression or actually apply.
|
kindly consider enabler: |
There was a problem hiding this comment.
Pull request overview
Reorganizes the OpenRewrite recipe catalog/configuration to group composite recipes separately from individual recipes and aligns sections with the OpenRewrite static analysis recipe listing.
Changes:
- Restructured
config/rewrite.ymlrecipe groupings (composite vs individual), added section comments, and reformatted descriptions. - Added
SASTto the spellchecker whitelist.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| config/rewrite.yml | Reorders/regroups OpenRewrite recipes and introduces/renames recipe definitions and section headers. |
| config/jsoref-spellchecker/whitelist.words | Adds SAST to the allowed word list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - org.openrewrite.staticanalysis.CommonStaticAnalysis | ||
| # individual recipes |
There was a problem hiding this comment.
recipeList includes org.openrewrite.staticanalysis.CommonStaticAnalysis twice and also repeats the # individual recipes section header, which will cause the same composite recipe to run multiple times. Remove the duplicate entry/header so each recipe is listed only once.
| - org.openrewrite.staticanalysis.CommonStaticAnalysis | |
| # individual recipes |
| name: org.openrewrite.staticanalysis.CommonStaticAnalysis | ||
| displayName: Common static analysis issues | ||
| description: | | ||
| Resolve common static analysis issues (also known as SAST issues). | ||
| recipeList: | ||
| - tech.picnic.errorprone.refasterrules.BigDecimalRulesRecipes | ||
| - tech.picnic.errorprone.refasterrules.CharSequenceRulesRecipes |
There was a problem hiding this comment.
This recipe is named org.openrewrite.staticanalysis.CommonStaticAnalysis, but it only contains tech.picnic.errorprone.refasterrules.* entries. Reusing the OpenRewrite built-in recipe ID here is likely to shadow/override the upstream recipe and also makes the name/description misleading. Rename this recipe back to a Checkstyle-owned ID (e.g., org.checkstyle.RefasterRules) or remove it and reference the upstream recipe directly.
| type: specs.openrewrite.org/v1beta/recipe | ||
| name: org.checkstyle.StaticAnalysis | ||
| description: OpenRewrite standard fixes. | ||
| name: org.openrewrite.staticanalysis.CommonStaticAnalysis | ||
| displayName: Common static analysis issues | ||
| description: | | ||
| Resolve common static analysis issues (also known as SAST issues). |
There was a problem hiding this comment.
org.openrewrite.staticanalysis.CommonStaticAnalysis is defined a second time later in the same YAML file. Duplicate recipe names in a recipe catalog are ambiguous and can lead to one definition overriding the other (or load failures). Ensure each recipe name is unique (e.g., keep only one definition for this ID, and give other groups a different name).
| type: specs.openrewrite.org/v1beta/recipe | ||
| name: org.checkstyle.AutoFixesPart2 | ||
| displayName: Auto Fixes Part 2 | ||
| description: ErrorProne Refaster rules. | ||
| recipeList: |
There was a problem hiding this comment.
org.checkstyle.AutoFixesPart2 is defined here but is not referenced by any other recipe in this file (and org.checkstyle.AllAutoFixes in particular still references org.checkstyle.RefasterRules/org.checkstyle.StaticAnalysis). Either wire this new recipe into the active recipe graph or remove it to avoid dead/unused configuration.
| # current maintainer don't "like" orElseThrow() as better form of get() | ||
| # - tech.picnic.errorprone.refasterrules.OptionalRulesRecipes |
There was a problem hiding this comment.
Grammar in this comment is incorrect: "current maintainer don't" should be "current maintainer doesn't".
There was a problem hiding this comment.
org.openrewrite.staticanalysis.CommonStaticAnalysis is defined a second time later in the same YAML file. Duplicate recipe names in a recipe catalog are ambiguous and can lead to one definition overriding the other (or load failures). Ensure each recipe name is unique (e.g., keep only one definition for this ID, and give other groups a different name).
945802c to
0195a9c
Compare
|
@romani please review |
…documentation with Example3 showing Apache license header matching
| - org.openrewrite.java.format.PadEmptyForLoopComponents | ||
| - org.openrewrite.java.format.RemoveTrailingWhitespace | ||
| # until https://github.com/checkstyle/checkstyle/issues/18789 | ||
| # - org.openrewrite.java.migrate.UpgradeToJava21 |
There was a problem hiding this comment.
There was a problem hiding this comment.
- org.openrewrite.java.migrate.UpgradeToJava21
| # Composite group for static analysis, as on openrewrite website | ||
| --- | ||
| type: specs.openrewrite.org/v1beta/recipe | ||
| name: org.openrewrite.staticanalysis.CommonStaticAnalysis |
There was a problem hiding this comment.
Please use this group in most top list , under "composite recipes"
There was a problem hiding this comment.
@Anushreebasics , I expect simple update to make copy from web and disablement of what was not activated before.
Do not listen to @Pankraz76 , and simply try to archive simple goal. You have chance to merged quicker than his PRs
106319a to
3c0e858
Compare
|
@romani please review |
792232c to
2c45a8b
Compare
|
@romani please review |
|
CI is red, please fix |
2c45a8b to
c73187d
Compare
c73187d to
76a955f
Compare
|
@romani please review |
|
Expected update was like #18953 |

Issue #18673
fixes #18673
Summary:
Grouped and organized the OpenRewrite recipes by:
Moved the tech.picnic.errorprone.refasterrules recipes out of the static analysis composite group and listed them individually.
Added comments to clarify composite and individual recipe sections.
Reformatted the YAML for clarity and maintainability (e.g., multi-line description, section headers).
Removed duplicate and misplaced recipes from the static analysis composite group.
These changes align the file structure and grouping with the OpenRewrite website. No logic or recipe content was changed—only the grouping, order, and formatting.
@romani please review