SONARJAVA-4975 Create custom rules plugin around symbolic execution engine#4798
SONARJAVA-4975 Create custom rules plugin around symbolic execution engine#4798leonardo-pilastri-sonarsource merged 11 commits intomasterfrom
Conversation
8702c6d to
b50bd3d
Compare
| @@ -10,7 +10,7 @@ | |||
|
|
|||
| <groupId>org.sonarsource.java</groupId> | |||
| <artifactId>java</artifactId> | |||
| <version>7.35.0-SNAPSHOT</version> | |||
| <version>7.36.0-SNAPSHOT</version> | |||
There was a problem hiding this comment.
Revert back to 7.35
| OrchestratorBuilder orchestratorBuilder = Orchestrator.builderEnv() | ||
| .useDefaultAdminCredentialsForBuilds(true) | ||
| .setSonarVersion(System.getProperty("sonar.runtimeVersion", "LATEST_RELEASE")) | ||
| .setSonarVersion(System.getProperty("sonar.runtimeVersion", "LATEST_RELEASE[10.3]")) |
There was a problem hiding this comment.
We need to change this back to LATEST_RELEASE
| .addPlugin(MavenLocation.of("org.sonarsource.sonar-lits-plugin", "sonar-lits-plugin", "0.11.0.2659")) | ||
| .addPlugin(FileLocation.of(TestClasspathUtils.findModuleJarPath("../../java-symbolic-execution/java-symbolic-execution-plugin").toFile())); |
There was a problem hiding this comment.
Can we add the symbolic execution plugin right after the Java plugin, for consistency?
|
|
||
| } | ||
|
|
||
| default void register(RegistrarContext registrarContext, CheckFactory checkFactory) { |
There was a problem hiding this comment.
Let's add a javadoc comment here too
| .map(repository::rule) | ||
| .forEach(rule -> rule.setTemplate(true)); |
There was a problem hiding this comment.
Maybe we don't need a separate map invocation here, it seems to me that we can merge the map & the forEach for better readability.
| assertThat(JavaSECheckList.getChecks()).isNotNull(); | ||
| assertThat(JavaSECheckList.getChecks()).hasSize(23); |
There was a problem hiding this comment.
You can chain these assertions.
|
|
||
| @Test | ||
| void plugin() { | ||
| SonarRuntime runtime = SonarRuntimeImpl.forSonarQube(Version.create(10, 2), SonarQubeSide.SERVER, SonarEdition.DEVELOPER); |
There was a problem hiding this comment.
Any reason we can't use the community edition here?
| @@ -80,7 +66,7 @@ void count() { | |||
| count++; | |||
| } | |||
| } | |||
| assertThat(CheckList.getChecks()).hasSize(count + SE_CHEKS.size()); | |||
| assertThat(CheckList.getChecks()).hasSize(count ); | |||
There was a problem hiding this comment.
| assertThat(CheckList.getChecks()).hasSize(count ); | |
| assertThat(CheckList.getChecks()).hasSize(count); |
ca66b78 to
4a2ad95
Compare
…ter rules into SonarJava repository
4a2ad95 to
935558c
Compare
|




Please ensure your pull request adheres to the following guidelines: