Closed yeikel closed 10 months ago
Hi @yeikel ; Thanks for the suggestion! We did this in a distant past, but have stopped doing this as it's nowadays quite common for scanning recipes to operate across file types, for instance only adding a dependency if a particular Java type is used. Such cases make it relatively rare for any recipe to only affect one particular file type, and the logic to track and selectively parse would make this quite complicated quickly. It'll almost certainly have to land in both of the plugins, and since you're using Maven I suggest to close this issue and watch this one for any work towards this:
What problem are you trying to solve?
While trying to run the
org.openrewrite.maven.OrderPomElements
recipe, I was hoping that it would only parse and process my pom files and apply the transformations neededWhat I noticed however is that it seems to be scanning all the source files instead
Describe the solution you'd like
In an ideal world, recipes that do not need to modify Java files like this one only parse what is needed. To process and reformat a few XML files, I'd expect the recipe to run in a few milliseconds at most
Have you considered any alternatives or workarounds?
I am not aware of any alternatives
Additional context
The reason I suspect that this scanned my entire source files is that the build took over 5 minutes to complete when changing a few pom files should not take that long