org.sonar.plugins.findbugs.rules.FindSecurityBugsScalaRulesDefinition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-findbugs-plugin Show documentation
Show all versions of sonar-findbugs-plugin Show documentation
SpotBugs is a program that uses static analysis to look for bugs in Java code. It can detect a variety of common coding mistakes, including thread synchronization problems, misuse of API methods.
package org.sonar.plugins.findbugs.rules;
import org.sonar.api.server.rule.RulesDefinition;
import org.sonar.api.server.rule.RulesDefinitionXmlLoader;
import org.sonar.plugins.findbugs.language.scala.Scala;
public class FindSecurityBugsScalaRulesDefinition implements RulesDefinition {
public static final String REPOSITORY_KEY = "findsecbugs-scala";
public static final String REPOSITORY_SCALA_NAME = "Find Security Bugs (Scala)";
public static final int RULE_COUNT = 9;
@Override
public void define(Context context) {
NewRepository repositoryJsp = context
.createRepository(REPOSITORY_KEY, Scala.KEY)
.setName(REPOSITORY_SCALA_NAME);
RulesDefinitionXmlLoader ruleLoaderJsp = new RulesDefinitionXmlLoader();
ruleLoaderJsp.load(repositoryJsp, FindSecurityBugsRulesDefinition.class.getResourceAsStream("/org/sonar/plugins/findbugs/rules-scala.xml"), "UTF-8");
repositoryJsp.done();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy