-
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 write custom Refaster rules #640
Comments
Hey @almibarss, thanks for reaching out! I have ~zero experience with Gradle, but it sounds like (a) the Refaster rule compiler is properly picked up, since My guess is then that that perhaps these two configurations are part of the same module? I don't expect that to work, because the A setup such as this one should work:
This way, during compilation of I hope this helps! If not, I'd be happy to have a look at some reproduction code. (Though, given that I know little about Gradle, and looking at my TODO list, I wouldn't be able to commit to a timeline.) |
Hi @Stephan202, thank you for your prompt response! Your guess was absolutely right. And I must admit that I was guessing sort of the same thing. The generation and collection of Here's the link to my repo where I've implemented a number of common scenarios such as custom rules: https://github.com/almibarss/error-prone-gradle-demo I still think there should exist some documentation somewhere because implementing your own rules sounds like a pretty essential feature and should be streamlined as much as possible. |
@almibarss happy it worked out! You're absolutely right about documentation! If you don't mind I'll reopen this issue to track that task. (Otherwise I can file a separate ticket and relabel this one as |
Problem
I couldn't find any documentation on how to write and apply your own Refaster rules. I've tried adding and enabling your Refaster rule compiler to the build like this:
Then I get my regular Java classes with
@BeforeTemplate
and@AfterTemplate
compiled into.refaster
files insidebuild/classes
.Unfortunately, even though I have the Refaster runner dependency as well, I cannot see any of my custom rules kicking in. I get all the error-prone-support checks tough.
Am I missing something here?
The text was updated successfully, but these errors were encountered: