package edu.hm.hafner.analysis.registry;

import edu.hm.hafner.analysis.IssueParser;
import edu.hm.hafner.analysis.parser.checkstyle.CheckStyleParser;

/**
 * A descriptor for Stylelint. Delegates to {@link CheckStyleParser}.
 *
 * @author Alexander Brandes
 */
class StylelintDescriptor extends ParserDescriptor {
    private static final String ID = "stylelint";
    private static final String NAME = "Stylelint";

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

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

    @Override
    public String getHelp() {
        return "Requires <a href='https://www.npmjs.com/package/stylelint-checkstyle-reporter'>stylelint-checkstyle-reporter</a>."
                + "<br/>Use --custom-formatter node_modules/stylelint-checkstyle-reporter/index.js -o stylelint-warnings.xml";
    }

    @Override
    public String getUrl() {
        return "https://stylelint.io/";
    }

    @Override
    public String getIconUrl() {
        return "https://cdn.worldvectorlogo.com/logos/stylelint.svg";
    }
}

@@ -797,16 +797,22 @@
 br/%3EUse 
+%3Ccode%3E
 --custom
@@ -899,16 +899,23 @@
 ings.xml
+%3C/code%3E
 %22;%0A    %7D

Update src/main/java/edu/hm/hafner/analysis/registry/StylelintDescriptor.java