Groovy Documentation

org.gradle.api.plugins.quality
[Groovy] Class CodeNarc

java.lang.Object
  org.gradle.api.internal.ConventionTask
      org.gradle.api.tasks.SourceTask
          org.gradle.api.plugins.quality.CodeNarc
All Implemented Interfaces:
Reporting, VerificationTask

class CodeNarc
extends SourceTask

Runs CodeNarc against some source files.


Property Summary
FileCollection codenarcClasspath

The class path containing the CodeNarc library to be used.

File configFile

The CodeNarc configuration file to use.

boolean ignoreFailures

Whether or not the build should break when the verifications performed by this task fail.

 
Constructor Summary
CodeNarc(Instantiator instantiator, IsolatedAntBuilder antBuilder)

 
Method Summary
File getReportFile()

The file to write the report to.

String getReportFormat()

The format type of the CodeNarc report.

CodeNarcReports getReports()

Returns the reports to be generated by this task.

CodeNarcReports reports(Closure closure)

Configures the reports to be generated by this task.

void run()

void setReportFile(File reportFile)

@deprecated Use {@code reports.

void setReportFormat(String reportFormat)

@deprecated Use {@code reports.

 
Methods inherited from class SourceTask
exclude, exclude, exclude, exclude, getDefaultSource, getExcludes, getIncludes, getSource, include, include, include, include, setExcludes, setIncludes, setSource, source
 

Property Detail

codenarcClasspath

@InputFiles
FileCollection codenarcClasspath
The class path containing the CodeNarc library to be used.


configFile

@InputFile
File configFile
The CodeNarc configuration file to use.


ignoreFailures

boolean ignoreFailures
Whether or not the build should break when the verifications performed by this task fail.


 
Constructor Detail

CodeNarc

@Inject
CodeNarc(Instantiator instantiator, IsolatedAntBuilder antBuilder)


 
Method Detail

getReportFile

@Deprecated
File getReportFile()
The file to write the report to.
deprecated:
Use reports..destination instead.


getReportFormat

@Deprecated
String getReportFormat()
The format type of the CodeNarc report.
deprecated:
Use reports..enabled instead.


getReports

CodeNarcReports getReports()
Returns the reports to be generated by this task.


reports

CodeNarcReports reports(Closure closure)
Configures the reports to be generated by this task.


run

@TaskAction
void run()


setReportFile

@Deprecated
void setReportFile(File reportFile)
deprecated:
Use reports..destination instead.


setReportFormat

@Deprecated
void setReportFormat(String reportFormat)
deprecated:
Use reports..enabled instead.


 

Gradle API 1.5