Skip to content

Commit 4f2e8a4

Browse files
Merge pull request #96 from cnescatlab/diegorodriguez31-patch-1
Hotfix "cannot add same measure twice"
2 parents 2801bbf + 765b97f commit 4f2e8a4

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ assignees: ''
2727
> _Please complete the following information._
2828
- OS: [e.g. Windows 10]
2929
- Java version: [e.g. 1.8]
30-
- i-Code version: [e.g. 3.1.0]
30+
- i-Code version: [e.g. 3.1.1]
3131
- Plugin version: [e.g. 2.0.0]
3232

3333
#### Additional context

.github/ISSUE_TEMPLATE/question.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ assignees: ''
1919
> _Please complete the following information._
2020
- OS: [e.g. Windows 10]
2121
- Java version: [e.g. 1.8]
22-
- i-Code version: [e.g. 3.1.0]
22+
- i-Code version: [e.g. 3.1.1]
2323
- Plugin version: [e.g. 2.0.0]
2424

2525
#### Additional context

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Here is the compatibility matrix of the plugin:
3535
| 3.0.0 | 4.1.0 | 7.9 -> 8.2 | Fortran |
3636
| 3.0.1 | 4.1.2 | 7.9 -> 8.2 | Fortran |
3737
| 3.1.0 | 4.1.2 | 7.9 -> 9.9 | Fortran |
38+
| 3.1.1 | 4.1.2 | 7.9 -> 9.9 | Fortran |
3839

3940
#### Run i-Code manually
4041
If you need help to run i-Code please refer to the [official user manual](https://github.com/cnescatlab/i-CodeCNES/wiki/User-Manual) or [i-Code issue tracker](https://github.com/cnescatlab/i-CodeCNES/issues).

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>fr.cnes.sonar.plugins</groupId>
77
<artifactId>sonar-icode-cnes-plugin</artifactId>
88
<packaging>sonar-plugin</packaging>
9-
<version>3.1.0</version>
9+
<version>3.1.1</version>
1010

1111
<name>Sonar i-Code CNES plugin</name>
1212

src/main/java/fr/cnes/sonar/plugins/icode/measures/ICodeMetricsProcessor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@ public static void saveMeasure(final SensorContext context, final Map<String, In
7979
// Get i-Code rule id to test if issue must be saved here.
8080
final String metricKey = icodeMeasure.getAnalysisRuleId();
8181
// Take F77 / F90 ncloc and number of comment lines into account
82-
if (metricKey.contains("MET.Line")) {
82+
if (metricKey.contains("MET.LineOfCode")) {
8383
saveSonarQubeNewMeasure(context, files, CoreMetrics.NCLOC, icodeMeasure);
84+
}
85+
// Take F77 / F90 number of comment lines into account
86+
else if (metricKey.contains("MET.LineOfComment")) {
8487
saveSonarQubeNewMeasure(context, files, CoreMetrics.COMMENT_LINES, icodeMeasure);
8588
}
8689
}

0 commit comments

Comments
 (0)