3030import java .util .Set ;
3131
3232import static org .assertj .core .api .Assertions .assertThat ;
33- import static org .assertj .core .api .Assertions .fail ;
3433import static org .mockito .Mockito .doReturn ;
3534import 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 \n On 'IntelliJ IDEA':" +
57- "\n 1. go to settings :" +
58- "\n > Build, Execution, Deployment > Build Tools > Maven > Runner" +
59- "\n 2. check option:" +
60- "\n > Delegate IDE build/run actions to Maven" +
61- "\n 3. 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