-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #812 from NotMyFault/feat/master/stylelint
Add Stylelint as additional alias for the CheckStyle parser
- Loading branch information
Showing
4 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/java/edu/hm/hafner/analysis/registry/StylelintDescriptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
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 <code>--custom-formatter node_modules/stylelint-checkstyle-reporter/index.js -o stylelint-warnings.xml</code>"; | ||
} | ||
|
||
@Override | ||
public String getUrl() { | ||
return "https://stylelint.io/"; | ||
} | ||
|
||
@Override | ||
public String getIconUrl() { | ||
return "https://cdn.worldvectorlogo.com/logos/stylelint.svg"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters