[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

Status: Resolved
Project: Gradle
Affects Version/s: 0.8
Fix Version/s: 0.9-rc-1

Type: Improvement
Reporter: Spencer Allain Assignee: Hans Dockter
Resolution: Fixed Votes: 1


 Description   

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.



 Comments   
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.

Generated at Wed Jun 30 11:35:50 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.