Run python checkstyle only on invalidated targets.

Review Request #2995 — Created Oct. 20, 2015 and submitted

benjyw
pants
9db9ffc...
pants-reviews
kwlzn, molsen
Removes that annoying 3-4 second pause every time you
iterate on a unit test.

CI passes: https://travis-ci.org/pantsbuild/pants/builds/86285193

KW
  1. lgtm!

  2. 
      
ST
  1. 
      
  2. If you add:

    @property
    def cache_target_dirs(self):
      return True
    

    you'll also get caching for this task. ... but if they never take longer than checking the cache would take, maybe you don't want to do that.

    1. There's nothing to cache - a successful run has no output, and an unsuccessful run won't cache its results.

    2. There needn't be anything to cache... an empty directory still results in a cache entry that will just act as a boolean value "passed checkstyle at this fingerprint". java and scala checkstyle both use it.

    3. Oh I see, so that if we revert to a previously known state we don't re-run checkstyle? It's probably worth doing for large python codebases. I'll follow up in another change.

  3. 
      
ST
  1. Ship It!
  2. 
      
NH
  1. Ship It!
  2. 
      
BE
MO
  1. LGTM

  2. 
      
BE
  1. Thanks folks! Submitted as 4d1d2ba4d565eff901d1d84ab029a77ffdaa06ea.

  2. 
      
BE
Review request changed

Status: Closed (submitted)

Change Summary:

4d1d2ba4d565eff901d1d84ab029a77ffdaa06ea

Loading...