Skip to content

Commit

Permalink
SONARSCALA-33 Update scapegoat rules mapping (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorian-burihabwa-sonarsource authored Nov 28, 2024
1 parent f212043 commit 74ab5c8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
[
{
"key": "com.sksamuel.scapegoat.inspections.AvoidRequire",
"name": "Use of require",
"type": "CODE_SMELL",
"severity": "MAJOR",
"url": "https://github.com/sksamuel/scapegoat/blob/master/README.md#inspections"
},
{
"key": "com.sksamuel.scapegoat.inspections.AvoidToMinusOne",
"name": "Checks for loops that use `x to n-1` instead of `x until n`",
Expand Down Expand Up @@ -773,6 +780,13 @@
"severity": "MINOR",
"url": "https://github.com/sksamuel/scapegoat/blob/master/README.md#inspections"
},
{
"key": "com.sksamuel.scapegoat.inspections.traits.AbstractTrait",
"name": "Check if trait is abstract",
"type": "CODE_SMELL",
"severity": "MINOR",
"url": "https://github.com/sksamuel/scapegoat/blob/master/README.md#inspections"
},
{
"key": "com.sksamuel.scapegoat.inspections.unneccesary.ConstantIf",
"name": "Checks for code where the if condition compiles to a constant",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void external_repository() {
assertThat(repository.name()).isEqualTo("Scapegoat");
assertThat(repository.language()).isEqualTo("scala");
assertThat(repository.isExternal()).isTrue();
assertThat(repository.rules()).hasSize(121);
assertThat(repository.rules()).hasSize(123);

RulesDefinition.Rule rule = repository.rule("com.sksamuel.scapegoat.inspections.AvoidToMinusOne");
assertThat(rule).isNotNull();
Expand Down

0 comments on commit 74ab5c8

Please sign in to comment.