Closed vlsi closed 8 months ago
Thanks for reporting your issue here. It sounds like you want to exclude one recipe when running a composite recipe, is that correct? It comes up from time to time, leading us to add it to the frequently asked questions. In short it's not easy to exclude a single recipe, as other recipes might expect other recipes to have run already. We suggest you create a copy of such a composite recipe only containing the recipes you want to run.
Especially for libraries I understand you're more sensitive to backwards compatibility. A custom recipe set would then make most sense.
Hope you don't mind me closing this issue as there's more details in the link above. I'll still monitor any replies that come in below.
Thanks for the link. I suggest adding an explicit link from https://docs.openrewrite.org/recipes/staticanalysis/codecleanup and https://docs.openrewrite.org/recipes/staticanalysis/commonstaticanalysis to https://github.com/openrewrite/rewrite-static-analysis/blob/main/src/main/resources/META-INF/rewrite/static-analysis.yml and similar group recipes.
The only practical way of listing 30+ recipes is to copy-paste them, and it would help to reference the relevant source.
Thanks for the link. I suggest adding an explicit link from https://docs.openrewrite.org/recipes/staticanalysis/codecleanup and https://docs.openrewrite.org/recipes/staticanalysis/commonstaticanalysis to https://github.com/openrewrite/rewrite-static-analysis/blob/main/src/main/resources/META-INF/rewrite/static-analysis.yml and similar group recipes.
The only practical way of listing 30+ recipes is to copy-paste them, and it would help to reference the relevant source.
That's what the GitHub link under Source does right? Or did I misunderstand? Maybe we should add an icon there to make it clear /cc @mike-solomon
Or listing the last element of that path as a clickable link like FindAndReplace.java
or static-analysis.yml
Thanks for the link. I suggest adding an explicit link from https://docs.openrewrite.org/recipes/staticanalysis/codecleanup and https://docs.openrewrite.org/recipes/staticanalysis/commonstaticanalysis to https://github.com/openrewrite/rewrite-static-analysis/blob/main/src/main/resources/META-INF/rewrite/static-analysis.yml and similar group recipes. The only practical way of listing 30+ recipes is to copy-paste them, and it would help to reference the relevant source.
That's what the GitHub link under Source does right? Or did I misunderstand? Maybe we should add an icon there to make it clear /cc @mike-solomon Or listing the last element of that path as a clickable link like
FindAndReplace.java
orstatic-analysis.yml
I'm not sure I understand what you're suggesting. Is the idea that we'd want the GitHub logo next to the GitHub link? I'm not sure I follow how that would make the link clearer but maybe I'm misunderstanding something.
Adding the logo might help indeed, as folks are likely to skip over the text (I know I have in the past).
Adding the logo might help indeed, as folks are likely to skip over the text (I know I have in the past).
Fair enough! Opened an issue to add that.
Adding the logo might help indeed, as folks are likely to skip over the text (I know I have in the past).
I thought the link points to rewrite-docs github, so users could update the docs :-/
Adding the logo might help indeed, as folks are likely to skip over the text (I know I have in the past).
I thought the link points to rewrite-docs github, so users could update the docs :-/
Thanks for the feedback and clarification @vlsi !
Do you think that updating the section to say Recipe Source
instead of Source
would make that clearer?
Recipe source would indeed be great!
Added a note and updated the title - so hopefully that addresses all the concerns with this. Thanks again for the feedback!
What problem are you trying to solve?
I wanted adding
org.openrewrite.staticanalysis.CodeCleanup
recipe, however, it impliesHideUtilityClassConstructorStyle
which breaks backward compatibility.Describe the solution you'd like
I would like to exclude certain rules even if they are included with "group recipe".
Have you considered any alternatives or workarounds?
An alternative option could probably be adding
boolean isEnabled
atorg.openrewrite.style.Style
level, so the rules could be selectively disabled withrewrite.yml
Are you interested in contributing this feature to OpenRewrite?
It depends on the preferred implementation