Package org.gradle.api.plugins.quality
Klasse CodeNarc
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.tasks.SourceTask
org.gradle.api.plugins.quality.AbstractCodeQualityTask
org.gradle.api.plugins.quality.CodeNarc
- Alle implementierten Schnittstellen:
Comparable<Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.IConventionAware,org.gradle.api.internal.TaskInternal,Named,ExtensionAware,Reporting<CodeNarcReports>,Task,PatternFilterable,VerificationTask,Configurable<Task>
@CacheableTask
public abstract class CodeNarc
extends AbstractCodeQualityTask
implements Reporting<CodeNarcReports>
Runs CodeNarc against some source files.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.gradle.api.Task
Task.Namer -
Feldübersicht
Von Schnittstelle geerbte Felder org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungThe class path containing the CodeNarc library to be used.The class path to be used by CodeNarc when compiling classes during analysis.The 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 reports to be generated by this task.Returns the source for this task, after the include and exclude patterns have been applied.Configures the reports to be generated by this task.reports(Action<? super CodeNarcReports> configureAction) Configures the reports to be generated by this task.voidrun()voidsetCodenarcClasspath(FileCollection codenarcClasspath) The class path containing the CodeNarc library to be used.voidsetCompilationClasspath(FileCollection compilationClasspath) The class path to be used by CodeNarc when compiling classes during analysis.voidsetConfig(TextResource config) The CodeNarc configuration to use.voidsetConfigFile(File configFile) 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.Von Klasse geerbte Methoden org.gradle.api.plugins.quality.AbstractCodeQualityTask
configureForkOptions, getIgnoreFailures, getIgnoreFailuresProperty, getJavaLauncher, getMaxHeapSize, getMinHeapSize, getObjectFactory, getToolchainService, getWorkerExecutor, setIgnoreFailuresVon Klasse geerbte Methoden org.gradle.api.tasks.SourceTask
exclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSet, getPatternSetFactory, include, include, include, include, setExcludes, setIncludes, setSource, setSource, sourceVon Klasse geerbte Methoden org.gradle.api.internal.ConventionTask
conventionMapping, conventionMapping, getConventionMappingVon Klasse geerbte Methoden org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceVon Klasse geerbte Methoden org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Konstruktordetails
-
CodeNarc
public CodeNarc()
-
-
Methodendetails
-
getConfigFile
The CodeNarc configuration file to use. -
getSource
Returns the source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist.The
PathSensitivityfor the sources is configured to bePathSensitivity.ABSOLUTE. If your sources are less strict, please change it accordingly by overriding this method in your subclass.- Setzt außer Kraft:
getSourcein KlasseSourceTask- Gibt zurück:
- The source.
-
setConfigFile
The CodeNarc configuration file to use. -
run
public void run() -
reports
Configures the reports to be generated by this task.- Angegeben von:
reportsin SchnittstelleReporting<CodeNarcReports>- Parameter:
closure- The configuration- Gibt zurück:
- The report container
-
reports
Configures the reports to be generated by this task.- Angegeben von:
reportsin SchnittstelleReporting<CodeNarcReports>- Parameter:
configureAction- The configuration- Gibt zurück:
- The report container
-
getCodenarcClasspath
The class path containing the CodeNarc library to be used. -
setCodenarcClasspath
The class path containing the CodeNarc library to be used. -
getCompilationClasspath
The class path to be used by CodeNarc when compiling classes during analysis.- Seit:
- 4.2
-
setCompilationClasspath
The class path to be used by CodeNarc when compiling classes during analysis.- Seit:
- 4.2
-
getConfig
The CodeNarc configuration to use. Replaces theconfigFileproperty.- Seit:
- 2.2
-
setConfig
The CodeNarc configuration to use. Replaces theconfigFileproperty.- Seit:
- 2.2
-
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. -
getReports
The reports to be generated by this task.- Angegeben von:
getReportsin SchnittstelleReporting<CodeNarcReports>- Gibt zurück:
- The report container
-