Skip to content

Commit

Permalink
Merge pull request #96 from cnescatlab/diegorodriguez31-patch-1
Browse files Browse the repository at this point in the history
Hotfix "cannot add same measure twice"
  • Loading branch information
diegorodriguez31 authored Aug 4, 2023
2 parents 2801bbf + 765b97f commit 4f2e8a4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ assignees: ''
> _Please complete the following information._
- OS: [e.g. Windows 10]
- Java version: [e.g. 1.8]
- i-Code version: [e.g. 3.1.0]
- i-Code version: [e.g. 3.1.1]
- Plugin version: [e.g. 2.0.0]

#### Additional context
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ assignees: ''
> _Please complete the following information._
- OS: [e.g. Windows 10]
- Java version: [e.g. 1.8]
- i-Code version: [e.g. 3.1.0]
- i-Code version: [e.g. 3.1.1]
- Plugin version: [e.g. 2.0.0]

#### Additional context
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Here is the compatibility matrix of the plugin:
| 3.0.0 | 4.1.0 | 7.9 -> 8.2 | Fortran |
| 3.0.1 | 4.1.2 | 7.9 -> 8.2 | Fortran |
| 3.1.0 | 4.1.2 | 7.9 -> 9.9 | Fortran |
| 3.1.1 | 4.1.2 | 7.9 -> 9.9 | Fortran |

#### Run i-Code manually
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).
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>fr.cnes.sonar.plugins</groupId>
<artifactId>sonar-icode-cnes-plugin</artifactId>
<packaging>sonar-plugin</packaging>
<version>3.1.0</version>
<version>3.1.1</version>

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ public static void saveMeasure(final SensorContext context, final Map<String, In
// Get i-Code rule id to test if issue must be saved here.
final String metricKey = icodeMeasure.getAnalysisRuleId();
// Take F77 / F90 ncloc and number of comment lines into account
if (metricKey.contains("MET.Line")) {
if (metricKey.contains("MET.LineOfCode")) {
saveSonarQubeNewMeasure(context, files, CoreMetrics.NCLOC, icodeMeasure);
}
// Take F77 / F90 number of comment lines into account
else if (metricKey.contains("MET.LineOfComment")) {
saveSonarQubeNewMeasure(context, files, CoreMetrics.COMMENT_LINES, icodeMeasure);
}
}
Expand Down

0 comments on commit 4f2e8a4

Please sign in to comment.