Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2888

Fail build on Checkstyle Warning Violation

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None

      Description

      Hi,

      Java 1.7u40
      Gradle 1.7

      I was wondering how I might fail a build if there are any checkstyle failures? Currently I have this block defined in my build.gradle:

      checkstyle {
      ignoreFailures = false
      }

      Unfortunately, that only works on Checkstyle errors. I notice in the Ant configuration one can set a property to fail if warnings are above a certain threshold [Checkstyle Ant]([1]http://checkstyle.sourceforge.net/ant...), specifically the maxWarnings property. I'm not sure how to do this on Gradle!

      Any help would be greatly appreciated!

      Thank you.

      =david=
      ----------------------------------------------------------------------------------------
      [1] http://checkstyle.sourceforge.net/anttask.html

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            forums Gradle Forums
            Votes:
            8 Vote for this issue
            Watchers:
            15 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: