`RefasterRuleCompiler` ignores all but one input file
See original GitHub issueFirst of all: Refaster is awesome. Defining new rules is child’s play. Super cool!
While playing around with it I defined a number of rewrite rules. If possible I’d like pass all of these to Error Prone in one go. But, while cursory look at the RefasterRuleCompiler
indicates that it outputs a list of CodeTransformer
s to the file specified using the --out
flag, only one of the input .java
files actually contributes to the output. Would it be possible to combine multiple before/after templates into a single .refaster
file?
(I’m not familiar with javac
internals, but if you give me some pointers I’m willing to implement this generalization. Provided that you think this is a sound idea in the first place, of course.)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Index (Error Prone parent POM HEAD-SNAPSHOT API)
A list of all checks with severity ERROR that are on by default. ENABLED_WARNINGS - Static variable in class com.google.errorprone.scanner.
Read more >Input files not all in same directory, please supply explicit wd ...
I encountered this error and your fix worked for me. I also tried passing an explicit working directory via the argument knit_root_dir but...
Read more >Java Examples for java.nio.file.FileSystems - Javatips.net
This java examples will help you to understand the usage of java.nio.file. ... in copy operation but you set an already existing file...
Read more >407643 – .gitignore: Ignore all but files of certain extension.
gitignore file: * !*.java !*/ It should ignore everything but the *.java files in current directory and its subdirectories. And it certainly ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FWIW: internally the refaster rule compiler only accepts one file at a time, but we also have a separate tool that assembles a “suite” (which can include mixed Refaster and Error Prone refactorings). We might be able to externalize that bit?
Thanks a lot @Stephan202! I hope a solution can be found that does not need the use of forks.
Given that the implementation of your first approach seems so trivial: Googlers (@nglorioso, @lowasser), is there hope that this gets integrated soon in error-prone? It absolutely makes sense to do this, and would make at least refaster usable in many cases until a more general solution like @Stephan202’s second approach can be done.