Groovy Documentation

groovy.org.codenarc.analyzer
[Groovy] Class DirectorySourceAnalyzer

java.lang.Object
  groovy.org.codenarc.analyzer.BaseSourceAnalyzer
      groovy.org.codenarc.analyzer.DirectorySourceAnalyzer

class DirectorySourceAnalyzer
extends BaseSourceAnalyzer

SourceAnalyzer implementation that recursively processes files in the configured source directories.

deprecated:
This is an internal class that will be removed in the future
Authors:
Chris Mair


Property Summary
static def SEP

String applyToFileNames

Only analyze filenames matching this value.

String applyToFilesMatching

Only analyze pathnames matching this regular expression.

String baseDirectory

The base directory; the sourceDirectories are relative to this, if not null.

String doNotApplyToFileNames

Do NOT analyze filenames matching this value.

String doNotApplyToFilesMatching

Do NOT analyze pathnames matching this regular expression.

List sourceDirectories

The list of source directories, relative to the baseDirectory if it is not null.

 
Method Summary
Results analyze(RuleSet ruleSet)

Analyze the source with the configured directory tree(s) using the specified RuleSet and return the report results.

 
Methods inherited from class BaseSourceAnalyzer
collectViolations
 

Property Detail

SEP

static final def SEP


applyToFileNames

String applyToFileNames
Only analyze filenames matching this value. The value may optionally be a comma-separated list of names. The name(s) may optionally include wildcard characters ('*' or '?').


applyToFilesMatching

String applyToFilesMatching
Only analyze pathnames matching this regular expression. If null, match all pathnames. This defaults to matching all pathnames that end with '.groovy'.


baseDirectory

String baseDirectory
The base directory; the sourceDirectories are relative to this, if not null. If this value is null, then treat sourceDirectories as full paths.


doNotApplyToFileNames

String doNotApplyToFileNames
Do NOT analyze filenames matching this value. The value may optionally be a comma-separated list of names. The name(s) may optionally include wildcard characters ('*' or '?').


doNotApplyToFilesMatching

String doNotApplyToFilesMatching
Do NOT analyze pathnames matching this regular expression. If null, then do not exclude any pathnames.


sourceDirectories

List sourceDirectories
The list of source directories, relative to the baseDirectory if it is not null. If sourceDirectories is null, then analyze files recursively from baseDirectory.


 
Method Detail

analyze

Results analyze(RuleSet ruleSet)
Analyze the source with the configured directory tree(s) using the specified RuleSet and return the report results.
Parameters:
ruleset - - the RuleSet to apply to each of the (applicable) files in the source directories
Returns:
the results from applying the RuleSet to all of the files in the source directories


 

Groovy Documentation