3

I have a project which has few lint warnings. For newly created changes if there are any lint warnings I want the build to fail. To do that I have added following options in gradle file.

lintOptions {
  baseline file("lint-baseline.xml")
  lintConfig file("lint.xml")
  warningsAsErrors true
  abortOnError true
}

Build fails for the newly created lint warnings. If resolved, it still fails pointing to old issues recorded in lint-baseline.xml

Error :

Lint found errors in the project; aborting build.

Fix the issues identified by lint, or add the following to your build script to proceed with errors: ... android { lintOptions { abortOnError false } } ...

Errors found:

/.../app/lint-baseline.xml: Error: 3 errors were filtered out because they are listed in the baseline file, lint-baseline.xml [LintBaseline]

AndroidDev
  • 1,485
  • 2
  • 18
  • 33

1 Answers1

0

could you try regenerating the baseline file? Often the hardcoded LOC in baseline files gets out of date due to other changes in the code.

Himanshu Walia
  • 163
  • 1
  • 9