Package org.gradle.api.plugins.quality
Class CodeNarcExtension
java.lang.Object
org.gradle.api.plugins.quality.CodeQualityExtension
org.gradle.api.plugins.quality.CodeNarcExtension
Configuration options for the CodeNarc plugin.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe CodeNarc configuration to use.The CodeNarc configuration file to use.The maximum number of priority 1 violations allowed before failing the build.The maximum number of priority 2 violations allowed before failing the build.The maximum number of priority 3 violations allowed before failing the build.The format type of the CodeNarc report.voidsetConfig(TextResource config) The CodeNarc configuration to use.voidsetConfigFile(File file) The CodeNarc configuration file to use.voidsetMaxPriority1Violations(int maxPriority1Violations) The maximum number of priority 1 violations allowed before failing the build.voidsetMaxPriority2Violations(int maxPriority2Violations) The maximum number of priority 2 violations allowed before failing the build.voidsetMaxPriority3Violations(int maxPriority3Violations) The maximum number of priority 3 violations allowed before failing the build.voidsetReportFormat(String reportFormat) Sets the format type of the CodeNarc report.Methods inherited from class org.gradle.api.plugins.quality.CodeQualityExtension
getIgnoreFailures, getIsIgnoreFailures, getReportsDir, getReportsDirectory, getSourceSets, getToolVersion, setIgnoreFailures, setReportsDir, setSourceSets, setToolVersion
-
Constructor Details
-
CodeNarcExtension
-
-
Method Details
-
getConfig
The CodeNarc configuration to use. Replaces theconfigFileproperty.- Since:
- 2.2
-
setConfig
The CodeNarc configuration to use. Replaces theconfigFileproperty.- Since:
- 2.2
-
getConfigFile
The CodeNarc configuration file to use. -
setConfigFile
The CodeNarc configuration file to use. -
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
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
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
The format type of the CodeNarc report. One ofhtml,xml,text,console. -
setReportFormat
Sets the format type of the CodeNarc report.
-