openrewrite / rewrite-analysis

OpenRewrite recipes for data flow analysis.
Apache License 2.0
8 stars 8 forks source link

refactor: Common static analysis issues #35

Closed knutwannheden closed 10 months ago

knutwannheden commented 10 months ago

Use this link to re-run the recipe: https://app.moderne.io/recipes/org.openrewrite.staticanalysis.CommonStaticAnalysis?organizationId=T3BlblJld3JpdGU%3D

knutwannheden commented 9 months ago

@JLLeitschuh Thanks for your review! I ran a recipe which did all these changes. The switch-to-if is due to https://docs.openrewrite.org/recipes/staticanalysis/minimumswitchcases (RSPEC-1301). Not sure I agree with that particular one either...

The lost comments are deficiencies of the respective recipes. I can try to fix these.

JLLeitschuh commented 9 months ago

The lost comments are deficiencies of the respective recipes. I can try to fix these.

Much appreciated. Can you also restore the lost comments in the meantime?

knutwannheden commented 9 months ago

Much appreciated. Can you also restore the lost comments in the meantime?

https://github.com/openrewrite/rewrite-analysis/commit/112b76e14c2401d078f18f35b83d1ba4fcc19ff0