[GRADLE-670] Checkstyle should have option to not throw exception upon violation detections Created: 30/Sep/09 Updated: 04/Jan/13 Resolved: 24/Nov/10
|Reporter:||Spencer Allain||Assignee:||Hans Dockter|
Checkstyle is basically unusable, because it throws a GradleException when any violation is detected (which causes the build to fail). Fail-on-violation is a useful option, but it certainly cannot be the default (and isn't for the underlying ant task), especially when attempting to use the plugin on existing code.
Basically, I cannot utilize this valuable plugin until this behavior is modified.
|Comment by Jason Porter [ 08/Dec/09 ]|
Here's your work around: ant.properties['org.gradle.checkstyle.violations'] = false
It seems like there are ant warnings after checkstyle though, but at least it doesn't throw the exception any more. This really needs to be a configurable part of the task.
|Comment by Adam Murdoch [ 09/Dec/09 ]|
This has been applied. Thank you for the patch.
I changed it a little. I've called the property ignoreFailures and the default is false. The property is also on the Test and CodeNarc tasks as well, now.