Skip to content

Commit 679e4d2

Browse files
committed
clean test code + correctipon sonar issue
1 parent 151b318 commit 679e4d2

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/test/java/fr/greencodeinitiative/python/PythonRuleRepositoryTest.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import java.util.Set;
3131

3232
import static org.assertj.core.api.Assertions.assertThat;
33-
import static org.assertj.core.api.Assertions.fail;
3433
import static org.mockito.Mockito.doReturn;
3534
import static org.mockito.Mockito.mock;
3635

@@ -41,30 +40,6 @@ class PythonRuleRepositoryTest {
4140

4241
@BeforeEach
4342
void init() {
44-
// TODO: Remove this check after Git repo split
45-
/*
46-
On an IDE (like IntelliJ), if the developer runs the unit tests without building/generating the Maven goals on the
47-
"ecocode-rules-specifications" module before, the unit tests will not see the generated HTML descriptions (from ASCIIDOC files).
48-
The developer must therefore configure his IDE to build the `ecocode-rules-specifications` module before launching the Tests.
49-
50-
When the `python-plugin` submodule is in a specific Git repository, `ecocode-rules-specifications` will be fetched from a classic
51-
external Maven dependency. There will therefore no longer be any need to perform this specific configuration.
52-
*/
53-
if (PythonRuleRepository.class.getResource("/io/ecocode/rules/python/EC4.json") == null) {
54-
String message = "'ecocode-rules-specification' resources corrupted. Please check build of 'ecocode-rules-specification' module";
55-
if (System.getProperties().keySet().stream().anyMatch(k -> k.toString().startsWith("idea."))) {
56-
message += "\n\nOn 'IntelliJ IDEA':" +
57-
"\n1. go to settings :" +
58-
"\n > Build, Execution, Deployment > Build Tools > Maven > Runner" +
59-
"\n2. check option:" +
60-
"\n > Delegate IDE build/run actions to Maven" +
61-
"\n3. Click on menu: " +
62-
"\n > Build > Build Project"
63-
;
64-
}
65-
fail(message);
66-
}
67-
6843
final SonarRuntime sonarRuntime = mock(SonarRuntime.class);
6944
doReturn(Version.create(0, 0)).when(sonarRuntime).getApiVersion();
7045
rulesDefinition = new PythonRuleRepository(sonarRuntime);

0 commit comments

Comments
 (0)