AutoRefactor icon indicating copy to clipboard operation
AutoRefactor copied to clipboard

RFE: Introduce @SuppressAutoRefactor annotation

Open cal101 opened this issue 7 years ago • 4 comments

Hi!

Sometimes AutoRefactorings have bugs that are difficult to fix or are not yet fixed. Often those bugs come to surface only on very few compilation units.

But the concrete AutoRefactoring is still useful for the majority of other files.

I suggest AutoRefactor to look for a type annotation with simple name SuppressAutoRefactor and if its value contains the name of the refactoring, that refactoring is suppressed for that type.

If the package name of the annotation is ignored the annotation can be created in some user custom package.

@SuppressAutoRefactor(value={"InlineCodeRatherThanPeremptoryConditionRefactoring"}, description="disabled because of AutoRefactor/issues/338")

Opinions?

cal101 avatar May 19 '18 06:05 cal101

It's a good idea but this kind of idea often keeps in the backlog for a long time :)

Fabrice-TIERCELIN avatar May 19 '18 11:05 Fabrice-TIERCELIN

I have this itch and I am able to scratch ;-)

cal101 avatar May 19 '18 11:05 cal101

Good idea. Does it mean you are volunteering to implement it? ;)

JnRouvignac avatar Jul 03 '18 21:07 JnRouvignac

In the mean time I have a scratch machine aka exclude/include in the transform dsl. :-/

cal101 avatar Jul 04 '18 17:07 cal101