I have this in my build.gradle:
android {
lintOptions {
abortOnError false
absolutePaths false
lintConfig file('lint.xml')
baseline file('lint-baseline.xml')
}
}
And I have run Analyze > Inspect Code
previously to establish this baseline. I've also confirmed that this file does in fact exist, and is populated with issues to ignore.
However I still have many warnings showing up when I run Analyze > Inspect Code
. It seems that the issues that are not excluded based on the baseline are those not listed by lint --list
/the ones listed here.
They include 'Unused declaration', 'Field can be local', etc.
Is there any way to filter these out as well? Why does the code inspection check for warnings/errors that lint does not list as issues?
From Android Studio inspections:
I was just wondering the same thing. Maybe that will help explain things.
The baseline feature is intended to hide linting errors in the console and make it so that new warnings/errors will break the build. Unfortunately this doesn't suppress Android Studio inspections.