Skip to content

Commit 825b8d8

Browse files
Merge pull request #100 from cnescatlab/master
Rebase dev
2 parents 6cdfb1c + 1aa4b3f commit 825b8d8

File tree

7 files changed

+17
-13
lines changed

7 files changed

+17
-13
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

.github/workflows/draft-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: actions/setup-java@v2
2828
with:
2929
distribution: 'adopt'
30-
java-version: '11'
30+
java-version: '17'
3131
- name: Cache Maven packages
3232
uses: actions/cache@v2
3333
with:

.github/workflows/java-continuous-integration.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# This workflow is triggered each time
44
# commits are pushed to GitHub or a pull request is opened.
55
# It launches three jobs in parallel : a build with java 8,
6-
# a build with java 11 and a SonarCloud analysis.
6+
# a build with java 17 and a SonarCloud analysis.
77
---
88
name: Java CI
99

@@ -18,7 +18,7 @@ jobs:
1818
permissions:
1919
packages: read
2020
runs-on: ubuntu-latest
21-
name: Java 11 CI
21+
name: Java 17 CI
2222
steps:
2323
- name: Check out repository code
2424
uses: actions/checkout@v2
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/setup-java@v2
2929
with:
3030
distribution: 'adopt'
31-
java-version: 11
31+
java-version: 17
3232
- name: Cache Maven packages
3333
uses: actions/cache@v2
3434
with:
@@ -54,7 +54,7 @@ jobs:
5454
uses: actions/setup-java@v2
5555
with:
5656
distribution: 'adopt'
57-
java-version: '11'
57+
java-version: '17'
5858
- name: Cache Maven packages
5959
uses: actions/cache@v2
6060
with:

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
| 3.1.2 | 5.0.0 | 7.9 -> 9.9 | Fortran |
3940

4041
#### Run i-Code manually

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656

5757
<properties>
5858
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
59-
<jdk.version>1.8</jdk.version>
60-
<jdk.min.version>11</jdk.min.version>
61-
<jdk.max.version>11</jdk.max.version>
62-
<maven.compiler.source>1.8</maven.compiler.source>
63-
<maven.compiler.target>1.8</maven.compiler.target>
59+
<jdk.version>17</jdk.version>
60+
<jdk.min.version>17</jdk.min.version>
61+
<jdk.max.version>17</jdk.max.version>
62+
<maven.compiler.source>17</maven.compiler.source>
63+
<maven.compiler.target>17</maven.compiler.target>
6464
<sonar.apiVersion>9.8.0.203</sonar.apiVersion>
6565
<sonar.testingHarnessVersion>9.5.0.56709</sonar.testingHarnessVersion>
6666
<sonar.apiImplVersion>9.9.1.69595</sonar.apiImplVersion>

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)