jorgeortiz85/linter — pull request #3 by rjmac (2012-03-20 23:46:58+00:00)
Title: Configuring the action to perform on encountering a warn-condition

I've added an option to pass in a properties file that allows the plugin's user to define the action to take on encountering a construct that it wants to warn about. The action (one of "no_action", "warn", or "error") is configurable both globally and on a per-warning-type basis. The last commit in this series breaks the individual checks out into their own classes to serve as a base for growing the set of checks without bloating LinterPlugin.scala itself without bound.

I'm not super happy with the tests. They're pretty comprehensive, but in order to keep the amount of repetitive code down, I've made each individual test use a helper that invokes the actual test code multiple times with various options for testing each codepath. It ends up being memory intensive (many differently-configured Scala compilers instantiated!), not very fast, and honestly not very unit-testy. Still, it works.