Remove direct config access in scalastyle.py.

Review Request #1897 — Created March 11, 2015 and submitted — Latest diff uploaded

benjyw
pants
9f9ff17...
pants-reviews
ity, jinfeng, jsirois
Moved validation of task inputs to helper functions called in execute(),
as it's a bad idea to throw in a task's __init__ method.

Note that test_scalastyle.py does a lot of poking around in Scalastyle's
internal state, which is not recommended in general and is defeated by
moving the validation out of __init__ as mentioned above.

So this change also does some refactoring of scalastyle.py to make it
more testable.

I also removed a couple of tests that were literally just testing that
internal variables were set from config, for similar reasons.

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

Loading...