
org.sonar.plugins.pmd.PmdUnitTestsRulesDefinition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-pmd-plugin Show documentation
Show all versions of sonar-pmd-plugin Show documentation
PMD is a tool that looks for potential problems like possible bugs, dead code, suboptimal code, overcomplicated expressions or duplicate code.
The newest version!
/*
* SonarQube PMD Plugin
* Copyright (C) 2012 SonarSource
* [email protected]
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
*/
package org.sonar.plugins.pmd;
import org.sonar.api.server.rule.RulesDefinition;
import org.sonar.plugins.java.Java;
public final class PmdUnitTestsRulesDefinition implements RulesDefinition {
public PmdUnitTestsRulesDefinition() {
}
@Override
public void define(Context context) {
NewRepository repository = context
.createRepository(PmdConstants.TEST_REPOSITORY_KEY, Java.KEY)
.setName(PmdConstants.TEST_REPOSITORY_NAME);
PmdRulesDefinition.extractRulesData(repository, "/org/sonar/plugins/pmd/rules-unit-tests.xml", "/org/sonar/l10n/pmd/rules/pmd-unit-tests");
repository.done();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy