Excluding delombok'd java code from search
Answered
I have a large java project which, in some places, using lombok.
The lombok plugin is installed in intellij.
As part of the build process, javadoc is built, so the code is also delombok'd
source is in src/java, whilst delombok'd is in build/generated/sources/delombok (and similar for maven - we have both build tools setup)
This results in any 'find in files' operation getting 'duplicates'. Ideally I want to search only the main source, not generated.
I looked at custom scopes, hoping this may satisfy this required, but wasn't sure how to exclude.
Any tips?
Please sign in to leave a comment.
>I looked at custom scopes, hoping this may satisfy this required, but wasn't sure how to exclude.
Create a custom scope, for which you exclude (see the example in the given ink) the build/generated/sources directory and include all other project directories and files. Then use this scope in Find in Path dialog.
There is also a reference for the scope syntax.