Skip to content
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

XepPatchChecks, default checks and refaster check #595

Open
BKer opened this issue Apr 7, 2017 · 2 comments
Open

XepPatchChecks, default checks and refaster check #595

BKer opened this issue Apr 7, 2017 · 2 comments
Assignees

Comments

@BKer
Copy link

BKer commented Apr 7, 2017

Hi,

At the moment I’m on my phone, so typing isn’t the most comfortable thing to do.

I tried to combine -XepPatchChecks with a refaster check. When, deliberately adding errors the checks generate a patch file, however the custom refaster check is not present in the patch file. Running refaster without the other checks generates the patch file with the custom refaster refactorings.
This is my -XepPatchChecks parameter passed to the compiler:
-XepPatchChecks:MissingOverride,DefaultCharset,DeadException,refaster:/path/to/my/CustomRule.refaster
How can I have a patch file containing both the modifications made by the default checks and my custom refaster rule?
I hope someone can point me into the right direction :)

@eaftan
Copy link
Contributor

eaftan commented Apr 7, 2017

@nglorioso, can you take a look?

@nick-someone
Copy link
Member

https://github.com/google/error-prone/blob/master/check_api/src/main/java/com/google/errorprone/ErrorProneOptions.java#L322 currently we don't allow concatenating Refaster rules and built-in checkers. We should allow this, but it's a bit hacky due to the way these are constructed (there's a separation from the options parsing and loading the built-in checkers).

We have plans to improve the experience here, but I can see if this functionality is easy to wedge into the command line flags without being too awkward :)

Stephan202 added a commit to PicnicSupermarket/error-prone that referenced this issue Oct 23, 2017
- Support arguments combining built-in and Refaster rules.
- Support arguments listing multiple Refaster rules.

Fixes google#595
Stephan202 added a commit to PicnicSupermarket/error-prone that referenced this issue Oct 23, 2017
- Support arguments combining built-in and Refaster rules.
- Support arguments listing multiple Refaster rules.

Fixes google#595
Stephan202 added a commit to PicnicSupermarket/error-prone that referenced this issue Nov 19, 2017
- Support arguments combining built-in and Refaster rules.
- Support arguments listing multiple Refaster rules.

Fixes google#595
Stephan202 added a commit to PicnicSupermarket/error-prone that referenced this issue Feb 24, 2019
- Support arguments combining built-in and Refaster rules.
- Support arguments listing multiple Refaster rules.

Fixes google#595
Stephan202 added a commit to PicnicSupermarket/error-prone that referenced this issue Dec 31, 2022
- Support arguments combining built-in and Refaster rules.
- Support arguments listing multiple Refaster rules.

Fixes google#595
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants