All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ch.acanda.maven.coan.checkstyle.IssueCollector Maven / Gradle / Ivy

Go to download

The Code Analysis Maven Plugin runs several static analysis tools to check your code for bugs, design and formatting problems.

There is a newer version: 1.13.0
Show newest version
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