diff --git a/ChangeLog b/ChangeLog
index c6f18018d..200bb2a35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-10-31 Oliver Burn
Binary and source distributions are from http://www.puppycrawl.com/checkstyle.
+Binary and source distributions are from http://checkstyle.sourceforge.net/.
Source code is stored under CVS at SourceForge. The project page is http://sourceforge.net/projects/checkstyle.
diff --git a/src/checkstyle/com/puppycrawl/tools/checkstyle/CheckStyleTask.java b/src/checkstyle/com/puppycrawl/tools/checkstyle/CheckStyleTask.java index 6ce69d1a4..37a71b035 100644 --- a/src/checkstyle/com/puppycrawl/tools/checkstyle/CheckStyleTask.java +++ b/src/checkstyle/com/puppycrawl/tools/checkstyle/CheckStyleTask.java @@ -49,6 +49,9 @@ public class CheckStyleTask /** name of file to check **/ private String mFileName; + /** whether to fail build on violations **/ + private boolean mFailOnViolation = true; + /** contains the filesets to process **/ private final List mFileSets = new ArrayList(); @@ -189,6 +192,12 @@ public class CheckStyleTask } } + /** @param aFail whether to fail if a violation is found **/ + public void setFailOnViolation(boolean aFail) + { + mFailOnViolation = aFail; + } + /** @param aNum **/ public void setHeaderIgnoreLine(int aNum) { @@ -264,7 +273,7 @@ public class CheckStyleTask } } - if (numErrs > 0) { + if ((numErrs > 0) && mFailOnViolation) { throw new BuildException("Got " + numErrs + " errors.", location); } }