Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ignore complete folders for lint checking with gradle?

Tags:

I have an Android project that includes generated code. This code has some lint violations in it that I don't want to show up in the lint reports because we won't fix this code problems manually.

Is it somehow possible to exclude folders in the lint check?

like image 942
Janusz Avatar asked Jan 14 '14 15:01

Janusz


1 Answers

The correct way to do this is to add the following block to your app's lint.xml (this file is by default placed at the root of your app module):

<issue id="all">     <ignore path="build" /> </issue> 

This will instruct Lint to ignore all issues for the specified folder. If there is no lint.xml in your app module folder, create one with the following content:

<?xml version="1.0" encoding="UTF-8"?> <lint>     <issue id="all">         <ignore path="build" />     </issue> </lint>  
like image 119
Idolon Avatar answered Sep 21 '22 08:09

Idolon