use of com.puppycrawl.tools.checkstyle.api.SeverityLevelCounter in project checkstyle by checkstyle.
the class CheckstyleAntTask method realExecute.
/**
* Helper implementation to perform execution.
* @param checkstyleVersion Checkstyle compile version.
*/
private void realExecute(String checkstyleVersion) {
// Create the root module
RootModule rootModule = null;
try {
rootModule = createRootModule();
// setup the listeners
final AuditListener[] listeners = getListeners();
for (AuditListener element : listeners) {
rootModule.addListener(element);
}
final SeverityLevelCounter warningCounter = new SeverityLevelCounter(SeverityLevel.WARNING);
rootModule.addListener(warningCounter);
processFiles(rootModule, warningCounter, checkstyleVersion);
} finally {
destroyRootModule(rootModule);
}
}
Aggregations