ch.acanda.maven.coan.checkstyle.IssueCollector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of code-analysis-maven-plugin Show documentation
Show all versions of code-analysis-maven-plugin Show documentation
The Code Analysis Maven Plugin runs several static analysis tools to check
your code for bugs, design and formatting problems.
package ch.acanda.maven.coan.checkstyle;
import com.puppycrawl.tools.checkstyle.api.AuditEvent;
import com.puppycrawl.tools.checkstyle.api.AuditListener;
import lombok.Getter;
import java.util.ArrayList;
import java.util.List;
class IssueCollector implements AuditListener {
@Getter
private final List issues = new ArrayList<>();
@Override
public void auditStarted(final AuditEvent event) {
// nothing to do
}
@Override
public void auditFinished(final AuditEvent event) {
// nothing to do
}
@Override
public void fileStarted(final AuditEvent event) {
// nothing to do
}
@Override
public void fileFinished(final AuditEvent event) {
// nothing to do
}
@Override
public void addError(final AuditEvent event) {
issues.add(new CheckstyleIssue(event));
}
@Override
public void addException(final AuditEvent event, final Throwable throwable) {
// nothing to do
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy