This repository has been archived by the owner on Feb 2, 2023. It is now read-only.
Add ability to exclude paths from analysis #31
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows filtering of paths so they're excluded from analysis. By default it excludes the build directory which is where all generated files should be created, so it will ignore anything created by kapt, sqldelight etc as mentioned in #10 (comment).
There's a bit of a hacky workaround to get a list of glob patterns passed cleanly to the compiler plugin, which only accepts strings as input. Because the glob patterns could theoretically contain any character it didn't make sense to me to allow e.g. a comma-separated list of values, because the glob patterns themselves could include commas (or any other character you might use as a separator). The solution I used is to serialize the list before passing to the compiler plugin where it's deserialized so it's safe. This is transparent for anyone using the Gradle plugin which should be 99% of users.
This is what's done for some kapt compiler plugin options as well.
Closes #10