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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionThe CodeNarc configuration to use.The CodeNarc configuration file to use.intThe maximum number of priority 1 violations allowed before failing the build.intThe maximum number of priority 2 violations allowed before failing the build.intThe 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) The format type of the CodeNarc report.Methods inherited from class org.gradle.api.plugins.quality.CodeQualityExtensiongetReportsDir, getSourceSets, getToolVersion, isIgnoreFailures, setIgnoreFailures, setReportsDir, setSourceSets, setToolVersion
- 
Constructor Details- 
CodeNarcExtension
 
- 
- 
Method Details- 
getConfigThe CodeNarc configuration to use. Replaces theconfigFileproperty.- Since:
- 2.2
 
- 
setConfigThe CodeNarc configuration to use. Replaces theconfigFileproperty.- Since:
- 2.2
 
- 
getConfigFileThe CodeNarc configuration file to use.
- 
setConfigFileThe CodeNarc configuration file to use.
- 
getMaxPriority1Violationspublic int getMaxPriority1Violations()The maximum number of priority 1 violations allowed before failing the build.
- 
setMaxPriority1Violationspublic void setMaxPriority1Violations(int maxPriority1Violations) The maximum number of priority 1 violations allowed before failing the build.
- 
getMaxPriority2Violationspublic int getMaxPriority2Violations()The maximum number of priority 2 violations allowed before failing the build.
- 
setMaxPriority2Violationspublic void setMaxPriority2Violations(int maxPriority2Violations) The maximum number of priority 2 violations allowed before failing the build.
- 
getMaxPriority3Violationspublic int getMaxPriority3Violations()The maximum number of priority 3 violations allowed before failing the build.
- 
setMaxPriority3Violationspublic void setMaxPriority3Violations(int maxPriority3Violations) The maximum number of priority 3 violations allowed before failing the build.
- 
getReportFormatThe format type of the CodeNarc report. One ofhtml,xml,text,console.
- 
setReportFormatThe format type of the CodeNarc report. One ofhtml,xml,text,console.
 
-