-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
589 additions
and
73 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
47 changes: 47 additions & 0 deletions
47
.../com/qualinsight/plugins/sonarqube/smell/plugin/check/MissingDocumentationSmellCheck.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,47 @@ | ||
/* | ||
* qualinsight-plugins-sonarqube-smell | ||
* Copyright (c) 2015, QualInsight | ||
* http://www.qualinsight.com/ | ||
* | ||
* 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, you can retrieve a copy | ||
* from <http://www.gnu.org/licenses/>. | ||
*/ | ||
package com.qualinsight.plugins.sonarqube.smell.plugin.check; | ||
|
||
import org.sonar.api.server.rule.RulesDefinition; | ||
import org.sonar.check.Priority; | ||
import org.sonar.check.Rule; | ||
import org.sonar.squidbridge.annotations.SqaleLinearRemediation; | ||
import org.sonar.squidbridge.annotations.SqaleSubCharacteristic; | ||
import com.qualinsight.plugins.sonarqube.smell.api.model.SmellType; | ||
|
||
/** | ||
* Check for MISSING_DOCUMENTATION smell type. | ||
* | ||
* @author Michel Pawlak | ||
*/ | ||
@Rule(key = "0024", name = "Missing documentation", description = "Mandatory documentation is missing.", priority = Priority.CRITICAL, tags = { | ||
"documentation", | ||
"todo" | ||
}) | ||
@SqaleLinearRemediation(coeff = "1min", effortToFixDescription = "") | ||
@SqaleSubCharacteristic(value = RulesDefinition.SubCharacteristics.ERRORS) | ||
public class MissingDocumentationSmellCheck extends AbstractSmellCheck { | ||
|
||
@Override | ||
public SmellType smellType() { | ||
return SmellType.MISSING_DOCUMENTATION; | ||
} | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
...main/java/com/qualinsight/plugins/sonarqube/smell/plugin/check/MissingTestSmellCheck.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,47 @@ | ||
/* | ||
* qualinsight-plugins-sonarqube-smell | ||
* Copyright (c) 2015, QualInsight | ||
* http://www.qualinsight.com/ | ||
* | ||
* 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, you can retrieve a copy | ||
* from <http://www.gnu.org/licenses/>. | ||
*/ | ||
package com.qualinsight.plugins.sonarqube.smell.plugin.check; | ||
|
||
import org.sonar.api.server.rule.RulesDefinition; | ||
import org.sonar.check.Priority; | ||
import org.sonar.check.Rule; | ||
import org.sonar.squidbridge.annotations.SqaleLinearRemediation; | ||
import org.sonar.squidbridge.annotations.SqaleSubCharacteristic; | ||
import com.qualinsight.plugins.sonarqube.smell.api.model.SmellType; | ||
|
||
/** | ||
* Check for MISSING_TEST smell type. | ||
* | ||
* @author Michel Pawlak | ||
*/ | ||
@Rule(key = "0025", name = "Missing test", description = "An important or critical test is missing.", priority = Priority.BLOCKER, tags = { | ||
"tests", | ||
"todo" | ||
}) | ||
@SqaleLinearRemediation(coeff = "1min", effortToFixDescription = "") | ||
@SqaleSubCharacteristic(value = RulesDefinition.SubCharacteristics.ERRORS) | ||
public class MissingTestSmellCheck extends AbstractSmellCheck { | ||
|
||
@Override | ||
public SmellType smellType() { | ||
return SmellType.MISSING_TEST; | ||
} | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
...ualinsight/plugins/sonarqube/smell/plugin/check/NonComplianceWithStandardsSmellCheck.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,45 @@ | ||
/* | ||
* qualinsight-plugins-sonarqube-smell | ||
* Copyright (c) 2015, QualInsight | ||
* http://www.qualinsight.com/ | ||
* | ||
* 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, you can retrieve a copy | ||
* from <http://www.gnu.org/licenses/>. | ||
*/ | ||
package com.qualinsight.plugins.sonarqube.smell.plugin.check; | ||
|
||
import org.sonar.check.Priority; | ||
import org.sonar.check.Rule; | ||
import org.sonar.squidbridge.annotations.SqaleLinearRemediation; | ||
import org.sonar.squidbridge.annotations.SqaleSubCharacteristic; | ||
import com.qualinsight.plugins.sonarqube.smell.api.model.SmellType; | ||
|
||
/** | ||
* Check for NON_CMOPLIANCE_WITH_STANDARDS smell type. | ||
* | ||
* @author Michel Pawlak | ||
*/ | ||
@Rule(key = "0027", name = "Non compliance with standards", description = "The code does not comply with team or company development standards.", priority = Priority.CRITICAL, tags = { | ||
"non-compliance" | ||
}) | ||
@SqaleLinearRemediation(coeff = "1min", effortToFixDescription = "") | ||
@SqaleSubCharacteristic(value = "COMPLIANCE") | ||
public class NonComplianceWithStandardsSmellCheck extends AbstractSmellCheck { | ||
|
||
@Override | ||
public SmellType smellType() { | ||
return SmellType.NON_COMPLIANCE_WITH_STANDARDS; | ||
} | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
...n/src/main/java/com/qualinsight/plugins/sonarqube/smell/plugin/check/OtherSmellCheck.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,45 @@ | ||
/* | ||
* qualinsight-plugins-sonarqube-smell | ||
* Copyright (c) 2015, QualInsight | ||
* http://www.qualinsight.com/ | ||
* | ||
* 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, you can retrieve a copy | ||
* from <http://www.gnu.org/licenses/>. | ||
*/ | ||
package com.qualinsight.plugins.sonarqube.smell.plugin.check; | ||
|
||
import org.sonar.check.Priority; | ||
import org.sonar.check.Rule; | ||
import org.sonar.squidbridge.annotations.SqaleLinearRemediation; | ||
import org.sonar.squidbridge.annotations.SqaleSubCharacteristic; | ||
import com.qualinsight.plugins.sonarqube.smell.api.model.SmellType; | ||
|
||
/** | ||
* Check for OTHER smell type. | ||
* | ||
* @author Michel Pawlak | ||
*/ | ||
@Rule(key = "0026", name = "Uncategorized smell", description = "Other smell that could not be categorized in any of the existing code smells types.", priority = Priority.MINOR, tags = { | ||
"uncategorized" | ||
}) | ||
@SqaleLinearRemediation(coeff = "1min", effortToFixDescription = "") | ||
@SqaleSubCharacteristic(value = "MAINTAINABILITY_COMPLIANCE") | ||
public class OtherSmellCheck extends AbstractSmellCheck { | ||
|
||
@Override | ||
public SmellType smellType() { | ||
return SmellType.OTHER; | ||
} | ||
|
||
} |
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
Oops, something went wrong.