Class AntFileSetSourceAnalyzer

java.lang.Object
org.codenarc.analyzer.AbstractSourceAnalyzer
org.codenarc.ant.AntFileSetSourceAnalyzer
All Implemented Interfaces:
groovy.lang.GroovyObject, SourceAnalyzer

public class AntFileSetSourceAnalyzer extends AbstractSourceAnalyzer
SourceAnalyzer implementation that gets source files from one or more Ant FileSets.
  • Field Details

  • 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 null
      fileSet - - 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 Project
      fileSets - - the List of Ant FileSet; my be empty; must not be null
  • Method Details

    • analyze

      public Results analyze(RuleSet ruleSet)
      Analyze all source code using the specified RuleSet and return the report results.
      Parameters:
      ruleSet - - the RuleSet to apply to each source component; must not be null.
      Returns:
      the results from applying the RuleSet to all of the source
    • getSourceDirectories

      public List getSourceDirectories()
    • processFileSet

      private void processFileSet(org.apache.tools.ant.types.FileSet fileSet, RuleSet ruleSet, ExecutorService pool)
    • buildTask

      private Runnable buildTask(File baseDir, String filePath, RuleSet ruleSet)
    • processFile

      private void processFile(File baseDir, String filePath, RuleSet ruleSet)
    • incrementFileCount

      private void incrementFileCount(String parentPath)
    • addToResultsMap

      private void addToResultsMap(String parentPath, FileResults results)
    • addToParentResults

      private void addToParentResults(DirectoryResults reportResults, Results results)
    • addDirectoryResults

      private void addDirectoryResults(DirectoryResults reportResults)