Class CodeNarcExtension

    • Constructor Detail

      • CodeNarcExtension

        public CodeNarcExtension​(Project project)
    • Method Detail

      • getConfig

        public TextResource getConfig()
        The CodeNarc configuration to use. Replaces the configFile property.
        Since:
        2.2
      • setConfig

        public void setConfig​(TextResource config)
        The CodeNarc configuration to use. Replaces the configFile property.
        Since:
        2.2
      • getConfigFile

        public java.io.File getConfigFile()
        The CodeNarc configuration file to use.
      • setConfigFile

        public void setConfigFile​(java.io.File file)
        The CodeNarc configuration file to use.
      • getMaxPriority1Violations

        public int getMaxPriority1Violations()
        The maximum number of priority 1 violations allowed before failing the build.
      • setMaxPriority1Violations

        public void setMaxPriority1Violations​(int maxPriority1Violations)
        The maximum number of priority 1 violations allowed before failing the build.
      • getMaxPriority2Violations

        public int getMaxPriority2Violations()
        The maximum number of priority 2 violations allowed before failing the build.
      • setMaxPriority2Violations

        public void setMaxPriority2Violations​(int maxPriority2Violations)
        The maximum number of priority 2 violations allowed before failing the build.
      • getMaxPriority3Violations

        public int getMaxPriority3Violations()
        The maximum number of priority 3 violations allowed before failing the build.
      • setMaxPriority3Violations

        public void setMaxPriority3Violations​(int maxPriority3Violations)
        The maximum number of priority 3 violations allowed before failing the build.
      • getReportFormat

        public java.lang.String getReportFormat()
        The format type of the CodeNarc report. One of html, xml, text, console.
      • setReportFormat

        public void setReportFormat​(java.lang.String reportFormat)
        The format type of the CodeNarc report. One of html, xml, text, console.