Groovy Documentation

groovy.org.codenarc.results
[Groovy] Interface Results


interface Results

Represents the results of applying rules to one or more source files/directories

Authors:
Chris Mair


Method Summary
Results findResultsForPath(String path)

Return the Results object with the specified path within this results object or its descendents.

List getChildren()

@return the List of child Results objects; may be empty

int getNumberOfFilesWithViolations(boolean recursive)

Return the number of files with violations

int getNumberOfViolationsWithPriority(int priority, boolean recursive)

Return the number of violations with the specified priority

String getPath()

@return the path to the file or directory associated with these results

int getTotalNumberOfFiles(boolean recursive)

Return the total number of (Groovy) files analyzed

List getViolations()

@return the List of all violations; may be empty

boolean isFile()

@return true only if this object represents the results for a single file

 

Method Detail

findResultsForPath

Results findResultsForPath(String path)
Return the Results object with the specified path within this results object or its descendents.
Parameters:
path - - the path to search for
Returns:
this Results object if a match is found, otherwise null


getChildren

List getChildren()
Returns:
the List of child Results objects; may be empty


getNumberOfFilesWithViolations

int getNumberOfFilesWithViolations(boolean recursive)
Return the number of files with violations
Parameters:
recursive - - true if the returned count should include subdirectories as well
Returns:
the number of files containing violations


getNumberOfViolationsWithPriority

int getNumberOfViolationsWithPriority(int priority, boolean recursive)
Return the number of violations with the specified priority
Parameters:
priority - - the priority
recursive - - true if the returned count should include subdirectories as well
Returns:
the number of violations with the specified priority


getPath

String getPath()
Returns:
the path to the file or directory associated with these results


getTotalNumberOfFiles

int getTotalNumberOfFiles(boolean recursive)
Return the total number of (Groovy) files analyzed
Parameters:
recursive - - true if the returned count should include subdirectories as well
Returns:
the total number of files (with or without violations)


getViolations

List getViolations()
Returns:
the List of all violations; may be empty


isFile

boolean isFile()
Returns:
true only if this object represents the results for a single file


 

Groovy Documentation