uber / piranha

A tool for refactoring code related to feature flag APIs
Apache License 2.0
2.27k stars 190 forks source link

[PiranhaJava] Make Piranha skip code annotated with @lombok.Generated #106

Open lazaroclapp opened 3 years ago

lazaroclapp commented 3 years ago

And, ideally, a configurable list of annotations denoting generated source or AST structures.

See #105 for the kind of issue this seeks to avoid, and the limitations of this fix.

krmahadevan commented 2 years ago

@lazaroclapp - If I were to take a jab at this issue (The label good first issue seems lucrative), what is the expectations from this issue ? Is it merely confined to lombok (or) should we be considering something else as well ?

mkr-plse commented 2 years ago

If this is an issue in the Polyglot version, we can explore fixing this in a generic manner also by adding appropriate tree-sitter rulers. (cc @ketkarameya)

@krmahadevan Can you try that version?

ketkarameya commented 2 years ago

The new polyglot version is syntactic. If a file does not contain the usage of the flag api, it ignores it. We can also explore adding an option (configuration) that prevents Piranha from refactoring any code enclosed under a specific annotation(s).