Class AntFileSetSourceAnalyzer
java.lang.Object
org.codenarc.analyzer.AbstractSourceAnalyzer
org.codenarc.ant.AntFileSetSourceAnalyzer
- All Implemented Interfaces:
groovy.lang.GroovyObject, SourceAnalyzer
SourceAnalyzer implementation that gets source files from one or more Ant FileSets.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConcurrentMap<String, AtomicInteger> protected final List<org.apache.tools.ant.types.FileSet> private static final org.slf4j.Loggerprivate static final intprivate final org.apache.tools.ant.Projectprivate final ConcurrentMap<String, List<FileResults>> -
Constructor Summary
ConstructorsConstructorDescriptionAntFileSetSourceAnalyzer(org.apache.tools.ant.Project project, List<org.apache.tools.ant.types.FileSet> fileSets) Construct a new instance on the specified List of Ant FileSets.AntFileSetSourceAnalyzer(org.apache.tools.ant.Project project, org.apache.tools.ant.types.FileSet fileSet) Construct a new instance on the specified Ant FileSet. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddDirectoryResults(DirectoryResults reportResults) private voidaddToParentResults(DirectoryResults reportResults, Results results) private voidaddToResultsMap(String parentPath, FileResults results) Analyze all source code using the specified RuleSet and return the report results.private Runnableprivate voidincrementFileCount(String parentPath) private voidprocessFile(File baseDir, String filePath, RuleSet ruleSet) private voidprocessFileSet(org.apache.tools.ant.types.FileSet fileSet, RuleSet ruleSet, ExecutorService pool) Methods inherited from class AbstractSourceAnalyzer
collectViolations, getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
POOL_TIMEOUT_SECONDS
private static final int POOL_TIMEOUT_SECONDS- See Also:
-
project
private final org.apache.tools.ant.Project project -
fileSets
-
resultsMap
-
fileCountMap
-
-
Constructor Details
-
AntFileSetSourceAnalyzer
public AntFileSetSourceAnalyzer(org.apache.tools.ant.Project project, org.apache.tools.ant.types.FileSet fileSet) Construct a new instance on the specified Ant FileSet.- Parameters:
project- - the Ant Project; must not be nullfileSet- - the Ant FileSet; must not be null
-
AntFileSetSourceAnalyzer
AntFileSetSourceAnalyzer(org.apache.tools.ant.Project project, List<org.apache.tools.ant.types.FileSet> fileSets) Construct a new instance on the specified List of Ant FileSets.- Parameters:
project- - the Ant ProjectfileSets- - the List of Ant FileSet; my be empty; must not be null
-
-
Method Details
-
analyze
-
getSourceDirectories
-
processFileSet
private void processFileSet(org.apache.tools.ant.types.FileSet fileSet, RuleSet ruleSet, ExecutorService pool) -
buildTask
-
processFile
-
incrementFileCount
-
addToResultsMap
-
addToParentResults
-
addDirectoryResults
-