Package org.sonarsource.analyzer.commons
Class ExternalRuleLoader
- java.lang.Object
-
- org.sonarsource.analyzer.commons.ExternalRuleLoader
-
public class ExternalRuleLoader extends Object
Creates external rule repository based on json file in the format[ { "key": "...", "name": "..." }, ... ]"key" and "name" are required properties. Also could be provided:
- url (link to rule page)
- description (html description of rule)
- constantDebtMinutes (e.g. 30, by default 5)
- tags (array of strings, e.g.
"tags": [ "foo", "bar" ]) - severity (as in SQ API, e.g. "MAJOR")
- type (as in SQ API, e.g. "BUG")
-
-
Constructor Summary
Constructors Constructor Description ExternalRuleLoader(String linterKey, String linterName, String pathToMetadata, String languageKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateExternalRuleRepository(org.sonar.api.server.rule.RulesDefinition.Context context)LongruleConstantDebtMinutes(String ruleKey)Set<String>ruleKeys()org.sonar.api.batch.rule.SeverityruleSeverity(String ruleKey)org.sonar.api.rules.RuleTyperuleType(String ruleKey)
-