Skip to content

Commit

Permalink
[ISSUE 161] ➖ Remove unused junit dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
natixis-caen authored Apr 14, 2023
1 parent 4d99545 commit 56a4498
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 44 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [171](https://github.com/green-code-initiative/ecoCode/issues/171) Add migration mechanism to support "issue re-keying"

### Changed
- [#161](https://github.com/green-code-initiative/ecoCode/pull/161) Remove unnecessary junit dependencies in pom.xml

- [166](https://github.com/green-code-initiative/ecoCode/issues/166) Correction of wrong message of rule EC63
- [167](https://github.com/green-code-initiative/ecoCode/issues/167) Use same kind for rules across different languages
Expand Down
6 changes: 0 additions & 6 deletions java-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-migrationsupport</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
6 changes: 2 additions & 4 deletions javascript-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@
<artifactId>sonar-analyzer-commons</artifactId>
</dependency>

<!-- Testing dependencies -->

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package fr.greencodeinitiative.javascript;

import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.sonar.api.*;
import org.sonar.api.utils.Version;

import static org.assertj.core.api.Assertions.assertThat;

public class JavaScriptPluginTest {
class JavaScriptPluginTest {

@Test
public void extensions() {
void extensions() {
Plugin.Context context = new Plugin.Context(new MockedSonarRuntime());
new JavaScriptPlugin().define(context);
assertThat(context.getExtensions()).hasSize(1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package fr.greencodeinitiative.javascript;

import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.sonar.api.server.rule.RulesDefinition;

import static org.assertj.core.api.Assertions.assertThat;

public class JavaScriptRulesDefinitionTest {
class JavaScriptRulesDefinitionTest {

@Test
public void createExternalRepository() {
void createExternalRepository() {
RulesDefinition.Context context = new RulesDefinition.Context();
new JavaScriptRulesDefinition().define(context);
assertThat(context.repositories()).hasSize(1);
Expand Down
7 changes: 0 additions & 7 deletions php-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,11 @@
<!-- <artifactId>re2j</artifactId>-->
<!-- </dependency>-->

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand Down
15 changes: 0 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
<sonar-packaging.version>1.21.0.505</sonar-packaging.version>
<sonar.skipDependenciesPackaging>true</sonar.skipDependenciesPackaging>
<maven-shade-plugin.version>3.4.1</maven-shade-plugin.version>
<junit.version>4.13.2</junit.version>
<junit.jupiter.version>5.9.1</junit.jupiter.version>
<assertJ.version>3.23.1</assertJ.version>

Expand Down Expand Up @@ -156,27 +155,13 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-migrationsupport</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertJ.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.sonarsource.python</groupId>
<artifactId>python-checks-testkit</artifactId>
Expand Down
6 changes: 0 additions & 6 deletions python-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand Down

0 comments on commit 56a4498

Please sign in to comment.