Android lint exclude test directories ignore in config not working

I want to configure Android lint to ignore test paths and projects using lint.xml

Example lint.xml :

 <?xml version="1.0" encoding="UTF-8"?> <lint> ... <issue id="all" severity="ignore" > <ignore path="tests/projecttests/res/layout/button.xml" /> <ignore path="tests/projecttest2s/res/layout/button.xml" /> <ignore path="tests/projecttests2/res/layout/button.xml" /> ... </issue> </lint> 

used a cmd sample from the lint official page:

 lint --check Accessibility --html /var/www/asc/accessibility_report.html --config lint.xml 

But the files in lint.xml not ignored as expected.

I also tried:

 <ignore path="**/tests/projecttests2/res/layout/button.xml" /> 

but still have the same problem.

If I insert tools:ignore="all" in the given xml files, lint ignores this file.

+6
source share

Source: https://habr.com/ru/post/970288/


All Articles