Remove direct config access in scalastyle.py.

Review Request #1897 - Created March 11, 2015 and submitted

Information
Benjy Weinberger
pants
9f9ff17...
Reviewers
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

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Benjy Weinberger
Benjy Weinberger
John Sirois
Nick Howard (Twitter)
Benjy Weinberger
Benjy Weinberger
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted as a5c194eb37b31f00d13ebf7991767bf19d3fd332.

John Sirois
Ship It!
Nick Howard (Twitter)
Ship It!
Loading...