Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public class JavaRulingTest {

private static final ImmutableSet<String> SUBSET_OF_ENABLED_RULES = ImmutableSet.of(
"S2095", "S2189", "S2222", "S2583", "S2589", "S2637", "S2689", "S2755", "S3065",
"S3516", "S3518", "S3546", "S3655", "S3824", "S3958", "S3959", "S4165", "S4449", "S6373", "S6374", "S6376", "S6377");
"S3516", "S3546", "S3655", "S3824", "S3958", "S3959", "S4165", "S4449", "S6373", "S6374", "S6376", "S6377");

@ClassRule
public static TemporaryFolder tmpDumpOldFolder = new TemporaryFolder();
Expand Down Expand Up @@ -96,7 +96,7 @@ public static void prepare() throws Exception {
List<String> extraNonDefaultRules = List.of("S3546", "S6374");
ProfileGenerator.generate(ORCHESTRATOR, "Sonar Way", ImmutableMap.of(), new HashSet<>(), SUBSET_OF_ENABLED_RULES, result,
extraNonDefaultRules);
assertThat(result).hasSize(22); // ALL symbolic-execution rules
assertThat(result).hasSize(21); // ALL symbolic-execution rules

Path allRulesFolder = Paths.get("src/test/resources");
effectiveDumpOldFolder = tmpDumpOldFolder.getRoot().toPath().toAbsolutePath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.sonar.java.se.checks.ConditionalUnreachableCodeCheck;
import org.sonar.java.se.checks.CustomUnclosedResourcesCheck;
import org.sonar.java.se.checks.DenialOfServiceXMLCheck;
import org.sonar.java.se.checks.DivisionByZeroCheck;
import org.sonar.java.se.checks.InvariantReturnCheck;
import org.sonar.java.se.checks.LocksNotUnlockedCheck;
import org.sonar.java.se.checks.MapComputeIfAbsentOrPresentCheck;
Expand Down Expand Up @@ -50,7 +49,6 @@ private JavaSECheckList(){
public static List<Class<? extends SECheck>> getChecks() {
return List.of(
// SEChecks ordered by ExplodedGraphWalker need
DivisionByZeroCheck.class,
UnclosedResourcesCheck.class,
LocksNotUnlockedCheck.class,
NonNullSetToNullCheck.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static List<RuleKey> getSonarWayRuleKeys() {
"S2755",
"S3065",
"S3516",
"S3518",
"S3655",
"S3824",
"S3958",
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"S2755",
"S3065",
"S3516",
"S3518",
"S3655",
"S3824",
"S3958",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class JavaSECheckListTest {

@Test
void getChecks() {
assertThat(JavaSECheckList.getChecks()).isNotNull().hasSize(22);
assertThat(JavaSECheckList.getChecks()).isNotNull().hasSize(21);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ class JavaSECheckRegistrarTest {
private static final ActiveRules activeRules = activeRules(getRuleKeysWithRepo());

private static final List<String> rulesNotActiveByDefault = List.of(
"S2259",
"S2583",
"S2589",
"S3518",
"S3546",
"S3655",
"S3959",
Expand Down Expand Up @@ -85,7 +83,7 @@ void rules_definition() {
assertThat(repository.name()).isEqualTo("Sonar");
assertThat(repository.language()).isEqualTo("java");
List<RulesDefinition.Rule> rules = repository.rules();
assertThat(rules).hasSize(22);
assertThat(rules).hasSize(21);

var activeByDefault = rules.stream()
.filter(k -> !rulesNotActiveByDefault.contains(k.key()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void constructor() {
JavaSEProfileRegistrar registrar = new JavaSEProfileRegistrar();
TestProfileRegistrarContext context = new TestProfileRegistrarContext();
registrar.register(context);
assertThat(context.defaultQualityProfileRules).hasSize(20); // 2 are not in the default profile
assertThat(context.defaultQualityProfileRules).hasSize(19);
}

}