Is there any way, how to exclude android generated files (or manually specify excluded folders), from Analyze -> Inspect Code ?
Use a custom scope. After clicking Analyze > Inspect Code, from the Specify Inspection Scope dialog, click "..." after "Custom scope". Define a new scope. Recursively include Android
, app
, and whatever else is important. Then recursively exclude folders you don't want.
I like to put my generated code in the build
folder and exclude it. (To get code in the build
folder to be included in the build, include it in app.gradle
in android/sourceSets/main/java.srcDirs
.)
I've found answer
Excluded folders won't be taken in account for Code Analysis
You can do it using the Gradle IDEA plugin:
apply plugin: 'idea'
idea {
module {
excludeDirs = [file("unwanted-directory-name")]
}
}
Take a look at this answer:
You basically just create a custom scope with the following pattern: !file:*intermediates*/&&!file:*generated*/&&!lib:*..*
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With