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

edu.hm.hafner.analysis.registry.PyLintDescriptor Maven / Gradle / Ivy

Go to download

This library provides a Java object model to read, aggregate, filter, and query static analysis reports. It is used by Jenkins' warnings next generation plug-in to visualize the warnings of individual builds. Additionally, this library is used by a GitHub action to autograde student software projects based on a given set of metrics (unit tests, code and mutation coverage, static analysis warnings).

There is a newer version: 13.3.0
Show newest version
package edu.hm.hafner.analysis.registry;

import edu.hm.hafner.analysis.Issue;
import edu.hm.hafner.analysis.IssueParser;
import edu.hm.hafner.analysis.parser.PyLintParser;
import edu.hm.hafner.analysis.parser.pylint.PyLintDescriptions;
import edu.hm.hafner.analysis.util.Deferred;

/**
 * A descriptor for the PyLint.
 *
 * @author Lorenz Munsch
 */
class PyLintDescriptor extends ParserDescriptor {
    private static final String ID = "pylint";
    private static final String NAME = "Pylint";

    private final Deferred messages = new Deferred<>(PyLintDescriptions::new);

    PyLintDescriptor() {
        super(ID, NAME);
    }

    @Override
    public IssueParser createParser(final Option... options) {
        return new PyLintParser();
    }

    @Override
    public String getHelp() {
        return "

Start Pylint using this custom message template (can also be configured via a pylintrc configuration file):" + "

pylint --msg-template='{path}:{line}: [{msg_id}, {obj}] {msg} ({symbol})' modules_or_packages > pylint.log

" + "

"; } @Override public String getDescription(final Issue issue) { return messages.get().getDescription(issue.getType()); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy