-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to apply Refaster suggestions #598
Comments
Hey @lukelukes! Thanks for reaching out. Indeed we can do better here. To get you unblocked, it should be enough to:
Let us know if this helps; we'll use the feedback to clarify the documentation! |
Hey @Stephan202, thanks for the quick answer! For some reason yours excludes all Refaster checks, however this works: "-XepOpt:Refaster:NamePattern=^(?!.*(?:$ignoredPicnicRefasterRulesRegex)).*\$" Where ignoredPicnicRefasterRulesRegex is just a String of all the ignored check names without their class (e.g ImmutableListOf instead of ImmutableListRules.ImmutableListOf etc.) joined by a | (regex OR). |
Ah, this is good feedback. I'll have to check, but I suspect that what's documented won't work for Maven either 😅. I just ran this test in IDEA with a debugger and set a breakpoint on this lambda. The names against which it matches for this Refaster rule collection are:
So I think the documentation should be updated to use |
Alright, I tested it with Maven and found that (a) the inner parens were unnecessary (for the single-rule exclusion case) and (b) a If the new documentation works for you as well I'll close the issue :) |
Hi @Stephan202 , |
Hey @originalrusyn! Try with e.g. |
@Stephan202
So, I can only use regex like that to apply multiply Refaster rules at the same time? |
Happy to hear it works!
For now the
Ah you mean to use |
This is no longer an issue, thanks for the help. |
Problem
I couldn't find any documentation on how to apply the Refaster suggestions. The suggestions coming from Errorprone are applied as expected, but the Refaster ones don't and it is not obvious how to apply them. (Does it require your fork of Errorprone?)
The text was updated successfully, but these errors were encountered: