title: How Do We Configure Android Studio to Run Its Lint on Every Build?
body: <p>Once upon a time, particularly in Eclipse-land, Lint would run on every build, and so if you failed Lint checks, you would find out immediately. With Android Studio (tested on 1.3), Lint does not run by default on a build. Newcomers might make mistakes that Lint would check, but since Lint doesn't actually run, the newcomers don't find out about them.</p>
  
  <p>(IOW, if a Lint test did not run in a forest, is there really a Lint test?)</p>
  
  <p>Comments on <a href="http://www.kiodev.com/android-studio-lint-options/">this blog post</a> show how to kinda sorta get Lint to run as part of a build:</p>
  
  <ul>
  <li>Edit the project configuration</li>
  <li>In the General tab of the configuration, scroll down and fold open the "Before launch" panel</li>
  <li>In that panel, add a step to "Run Gradle Task" named <code>lint</code> for your module</li>
  </ul>
  
  <p>However, this runs command-line Lint, resulting in reports written in XML and HTML to your hard drive. That works, but it would be cleaner to have Android Studio run its in-IDE Lint checks, so the results show up in an IDE panel.</p>
  
  <p>Is there a way to set up a project build to perform the in-IDE Lint checks?</p>
  
  <p>Bonus points if it could be set up to <em>only</em> run Lint, not the full analysis done by Analyze > Inspect Code. While the full analysis is occasionally useful, Lint is slow enough as it is, let alone the dubiously-useful other analysis performed by Android Studio (e.g., spellchecking).</p>
  
  <p>While setting this up would not be a great plan for all projects (Lint scans are slow), for newcomers to Android, it might be an appropriate move.</p>