edu.hm.hafner.analysis.registry.PuppetLintDescriptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of analysis-model Show documentation
Show all versions of analysis-model Show documentation
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).
package edu.hm.hafner.analysis.registry;
import edu.hm.hafner.analysis.IssueParser;
import edu.hm.hafner.analysis.parser.PuppetLintParser;
import static j2html.TagCreator.*;
/**
* A descriptor for the Puppet Lint.
*
* @author Lorenz Munsch
*/
class PuppetLintDescriptor extends ParserDescriptor {
private static final String ID = "puppetlint";
private static final String NAME = "Puppet Lint";
PuppetLintDescriptor() {
super(ID, NAME);
}
@Override
public IssueParser createParser(final Option... options) {
return new PuppetLintParser();
}
@Override
public String getHelp() {
return join(text("You will need a recent enough version that supports"),
code("--log-format flag"),
text(". When running puppet-lint, make sure you use the log format"),
code("%{path}:%{line}:%{check}:%{KIND}:%{message}"),
text("."),
br(),
text("Complete example:"),
br(),
code("find . -iname *.pp -exec puppet-lint --log-format \"%{path}:%{line}:%{check}:%{KIND}:%{message}\" {} \\;"))
.render();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy