Skip to content

Commit eca4d83

Browse files
Merge pull request #89 from cnescatlab/dev
Release 3.0.0
2 parents 6fbf688 + c422368 commit eca4d83

31 files changed

+552
-1547
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ What types of changes does your code introduce to this plugin?
2525
- [ ] I have read the [CONTRIBUTING](https://github.com/lequal/sonar-icode-cnes-plugin/blob/master/CONTRIBUTING.md) doc
2626
- [ ] I agree with the [CODE OF CONDUCT](https://github.com/lequal/sonar-icode-cnes-plugin/blob/master/CONTRIBUTING.md)
2727
- [ ] Lint and unit tests pass locally with my changes
28-
- [ ] SonarCloud and Travis CI tests pass with my changes
28+
- [ ] SonarCloud and GitHub CI tests pass with my changes
2929
- [ ] I have added tests that prove my fix is effective or that my feature works
3030
- [ ] I have added necessary documentation (if appropriate)
3131
- [ ] Any dependent changes have been merged and published in downstream modules
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Description
2+
# ===========
3+
# This workflow is triggered each time a milestone is closed
4+
# It builds the jar, generates release notes, pushes a new tag
5+
# and makes a draft release with these elements.
6+
---
7+
name: Draft Release
8+
9+
on:
10+
milestone:
11+
types: [closed]
12+
13+
jobs:
14+
release:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out repository code
18+
uses: actions/checkout@v2
19+
- name: Setup java
20+
uses: actions/setup-java@v2
21+
with:
22+
distribution: 'adopt'
23+
java-version: '11'
24+
- name: Cache Maven packages
25+
uses: actions/cache@v2
26+
with:
27+
path: ~/.m2
28+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
29+
restore-keys: ${{ runner.os }}-m2
30+
- name: Build with Maven
31+
run: mvn -B clean package
32+
- name: Create Release Notes
33+
uses: docker://decathlon/release-notes-generator-action:2.0.1
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
OUTPUT_FOLDER: temp_release_notes
37+
- name: Set tag and project values
38+
run: |
39+
echo "tag=$(cat pom.xml | grep "<version>.*</version>" | head -1 |awk -F'[><]' '{print $3}')" >> $GITHUB_ENV
40+
echo "project=$(echo ${{ github.repository }} | awk -F '/' '{print $2}')" >> $GITHUB_ENV
41+
- name: Create a tag for the release
42+
run: |
43+
git config --global user.name "GitHub Actions"
44+
git config --global user.email [email protected]
45+
git tag -a ${{ env.tag }} -m "Release ${{ env.tag }}"
46+
git push origin ${{ env.tag }}
47+
- name: Create GitHub Release
48+
uses: ncipollo/release-action@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
artifacts: "target/${{ env.project }}-${{ env.tag }}.jar"
53+
tag: ${{ env.tag }}
54+
name: ${{ env.project }} ${{ env.tag }}
55+
bodyFile: "temp_release_notes/release_file.md"
56+
draft: true
57+
token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Description
2+
# ===========
3+
# This workflow is triggered each time
4+
# commits are pushed to GitHub or a pull request is opened.
5+
# It launches three jobs in parallel : a build with java 8,
6+
# a build with java 11 and a SonarCloud analysis.
7+
---
8+
name: Java CI
9+
10+
on: [push, pull_request]
11+
12+
jobs:
13+
14+
build:
15+
runs-on: ubuntu-latest
16+
name: Java 11 CI
17+
steps:
18+
- name: Check out repository code
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
- name: Setup java
23+
uses: actions/setup-java@v2
24+
with:
25+
distribution: 'adopt'
26+
java-version: 11
27+
- name: Cache Maven packages
28+
uses: actions/cache@v2
29+
with:
30+
path: ~/.m2
31+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
32+
restore-keys: ${{ runner.os }}-m2
33+
- name: Build with Maven
34+
run: mvn -B clean test package
35+
36+
code-analysis:
37+
runs-on: ubuntu-latest
38+
name: SonarCloud Code Analysis
39+
# It's not possible to launch an analysis on external pull requests
40+
if: ${{ github.repository_owner == 'cnescatlab' }}
41+
steps:
42+
- name: Check out repository code
43+
uses: actions/checkout@v2
44+
with:
45+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
46+
- name: Setup java
47+
uses: actions/setup-java@v2
48+
with:
49+
distribution: 'adopt'
50+
java-version: '11'
51+
- name: Cache Maven packages
52+
uses: actions/cache@v2
53+
with:
54+
path: ~/.m2
55+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
56+
restore-keys: ${{ runner.os }}-m2
57+
- name: Cache SonarCloud packages
58+
uses: actions/cache@v2
59+
with:
60+
path: ~/.sonar/cache
61+
key: ${{ runner.os }}-sonar
62+
restore-keys: ${{ runner.os }}-sonar
63+
- name: Build and analyze
64+
env:
65+
# Needed to get some information about the pull request, if any
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67+
# SonarCloud access token should be generated from https://sonarcloud.io/account/security/
68+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
69+
run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.organization=lequal -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ buildNumber.properties
2828

2929
# Ignore IntelliJ files
3030
.idea
31-
*.iml
31+
*.iml
32+
.vscode

.travis.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77

88
SonarQube plugin for the code analysis tool: i-Code CNES.
99

10-
SonarQube is an open platform to manage code quality. This plugin adds the ability to check Fortran (77 & 90) & Shell with i-Code or import pre-existing results of i-Code.
10+
SonarQube is an open platform to manage code quality. This plugin adds the ability to check Fortran (77 & 90) with i-Code or import pre-existing results of i-Code.
1111

1212
This plugin is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
1313

14-
You can get i-Code CNES on GitHub: [lequal/i-CodeCNES](https://github.com/lequal/i-CodeCNES).
14+
You can get i-Code CNES on GitHub: [cnescatlab/i-CodeCNES](https://github.com/cnescatlab/i-CodeCNES).
1515

1616
### Quickstart
1717
- Setup a SonarQube instance.
18-
- **[Optional]** Install i-Code command line application as described in [official documentation](https://github.com/lequal/i-CodeCNES/wiki/Installation-Manual).
18+
- **[Optional]** Install i-Code command line application as described in [official documentation](https://github.com/cnescatlab/i-CodeCNES/wiki/Installation-Manual).
1919
- Install `sonaricode-*.jar` in `<SONARQUBE_HOME>/extensions/plugins/`.
2020
- **[Optional]** Run i-Code manually or configure auto-launch in plugin configuration.
2121
- Run an analysis with *sonar-scanner*, *maven*, *gradle*, *msbuild*, etc.
@@ -33,30 +33,28 @@ Here is the compatibility matrix of the plugin:
3333
| 2.0.2 | 4.1.0 | 7.9 -> 8.2 |
3434

3535
#### Run i-Code manually
36-
If you need help to run i-Code please refer to the [official user manual](https://github.com/lequal/i-CodeCNES/wiki/User-Manual) or [i-Code issue tracker](https://github.com/lequal/i-CodeCNES/issues).
36+
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).
3737

3838
#### Run a specific i-Code version through sonaricode plugin
3939
If embedded version of i-Code does not match your need, you can set the execution of another installed version of i-Code through the following properties:
4040
- `sonar.icode.launch`: Activate autolaunch for i-Code if `true`. Default: `false`.
4141
- `sonar.icode.path`: Define i-Code CNES executable path to auto-launch it on analysis. Default: `${HOME}/icode-cnes/icode.exe`.
4242

4343
#### Other plugin's properties
44-
- `sonar.icode.shell.file.suffixes`: List of suffixes for Shell files to analyze. Default: `.sh,.ksh,.bash`.
4544
- `sonar.icode.f77.file.suffixes`: List of suffixes for F77 files to analyze. Default: `.f,.f77,.for,.fpp,.ftn,.F,.F77,.FOR,.FPP,.FTN`.
4645
- `sonar.icode.f90.file.suffixes`: List of suffixes for F90 files to analyze. Default: `.f90,.F90`.
4746
- `sonar.icode.reports.path`: Path to the i-Code reports. Multiple path can be provided. Default: `result.res`.
4847

4948
### Features
5049
- Fortran 77 analysis
5150
- Fortran 90 analysis
52-
- Shell analysis
5351
- Import i-Code results
5452

5553
#### Get i-Code help
5654
Use `icode -h` to get the following help about i-Code:
5755
````
5856
usage: icode [<FILE> [...]] [-c <arg>] [-e] [-f <arg>] [-h] [-l] [-o <arg>] [-p <arg>] [-q <arg>] [-r] [-x <arg>]
59-
Analyze Shell, F77 & F90 code to find defects & bugs.
57+
Analyze F77 & F90 code to find defects & bugs.
6058
6159
-c,--checked-languages <arg> Comma separated list of languages checked during analysis. All by default.
6260
-e,--exporters Display all available exporters.
@@ -70,20 +68,20 @@ Analyze Shell, F77 & F90 code to find defects & bugs.
7068
-r,--rules Display all available rules.
7169
-x,--excluded-rules <arg> Comma separated list of rules id to exclude from analysis. None by default.
7270
73-
Please report issues at https://github.com/lequal/i-CodeCNES/issues
71+
Please report issues at https://github.com/leqcnescatlabual/i-CodeCNES/issues
7472
````
7573

7674
### How to contribute
7775
If you experienced a problem with the plugin please open an issue. Inside this issue please explain us how to reproduce this issue and paste the log.
7876

7977
If you want to do a PR, please put inside of it the reason of this pull request. If this pull request fix an issue please insert the number of the issue or explain inside of the PR how to reproduce this issue.
8078

81-
All details are available in [CONTRIBUTING](https://github.com/lequal/sonar-icode-cnes-plugin/CONTRIBUTING.md).
79+
All details are available in [CONTRIBUTING](https://github.com/cnescatlab/sonar-icode-cnes-plugin/blob/master/CONTRIBUTING.md).
8280

8381
### Feedback and Support
8482
8583

86-
Bugs and Feature requests: https://github.com/lequal/sonar-icode-cnes-plugin/issues
84+
Bugs and Feature requests: https://github.com/cnescatlab/sonar-icode-cnes-plugin/issues
8785

8886
### License
8987
Licensed under the [GNU General Public License, Version 3.0](https://www.gnu.org/licenses/gpl.txt)

pom.xml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<groupId>fr.cnes.sonar.plugins</groupId>
77
<artifactId>sonar-icode-cnes-plugin</artifactId>
88
<packaging>sonar-plugin</packaging>
9-
<version>2.0.2</version>
9+
<version>3.0.0</version>
1010

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

1313
<description>i-Code CNES plugin for SonarQube</description>
14-
<url>https://github.com/lequal/sonar-icode-cnes-plugin</url>
14+
<url>https://github.com/cnescatlab/sonar-icode-cnes-plugin</url>
1515
<inceptionYear>2017</inceptionYear>
1616

1717
<licenses>
@@ -24,7 +24,7 @@
2424

2525
<organization>
2626
<name>CNES</name>
27-
<url>http://cnes.fr</url>
27+
<url>https://cnes.fr</url>
2828
</organization>
2929

3030
<developers>
@@ -61,12 +61,12 @@
6161
<commons-lang.version>3.7</commons-lang.version>
6262
<gson.version>2.8.2</gson.version>
6363
<slf4j.version>1.7.25</slf4j.version>
64-
<junit.version>4.12</junit.version>
64+
<junit.version>4.13.2</junit.version>
6565
<jacoco.version>0.8.4</jacoco.version>
6666
<sonar.pluginKey>icode</sonar.pluginKey>
6767
<sonar.pluginClass>fr.cnes.sonar.plugins.icode.ICodePlugin</sonar.pluginClass>
68-
<sonar.pluginUrl>https://github.com/lequal/sonar-icode-cnes-plugin</sonar.pluginUrl>
69-
<sonar.pluginSourcesUrl>https://github.com/lequal/sonar-icode-cnes-plugin</sonar.pluginSourcesUrl>
68+
<sonar.pluginUrl>https://github.com/cnescatlab/sonar-icode-cnes-plugin</sonar.pluginUrl>
69+
<sonar.pluginSourcesUrl>https://github.com/cnescatlab/sonar-icode-cnes-plugin</sonar.pluginSourcesUrl>
7070
<sonar.pluginOrganizationName>CNES</sonar.pluginOrganizationName>
7171
<sonar.sources>src/main/java</sonar.sources>
7272
<sonar.test>src/test/java</sonar.test>
@@ -106,7 +106,6 @@
106106
<dependency>
107107
<groupId>junit</groupId>
108108
<artifactId>junit</artifactId>
109-
<version>${junit.version}</version>
110109
<scope>test</scope>
111110
</dependency>
112111
<dependency>
@@ -118,7 +117,7 @@
118117
<dependency>
119118
<groupId>com.thoughtworks.xstream</groupId>
120119
<artifactId>xstream</artifactId>
121-
<version>1.4.11.1</version>
120+
<version>1.4.18</version>
122121
</dependency>
123122
</dependencies>
124123

@@ -214,4 +213,15 @@
214213

215214
</plugins>
216215
</build>
216+
217+
218+
<dependencyManagement>
219+
<dependencies>
220+
<dependency>
221+
<groupId>junit</groupId>
222+
<artifactId>junit</artifactId>
223+
<version>${junit.version}</version>
224+
</dependency>
225+
</dependencies>
226+
</dependencyManagement>
217227
</project>

src/main/java/fr/cnes/sonar/plugins/icode/ICodePlugin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import fr.cnes.sonar.plugins.icode.languages.Fortran77Language;
2121
import fr.cnes.sonar.plugins.icode.languages.Fortran90Language;
2222
import fr.cnes.sonar.plugins.icode.languages.ICodeQualityProfiles;
23-
import fr.cnes.sonar.plugins.icode.languages.ShellLanguage;
2423
import fr.cnes.sonar.plugins.icode.measures.ICodeNestingMetric;
2524
import fr.cnes.sonar.plugins.icode.rules.ICodeRulesDefinition;
2625
import fr.cnes.sonar.plugins.icode.settings.ICodePluginProperties;
@@ -39,7 +38,7 @@ public class ICodePlugin implements Plugin {
3938
@Override
4039
public void define(Context context) {
4140
// Setting plugin ICode
42-
context.addExtensions(ShellLanguage.class, Fortran77Language.class, Fortran90Language.class);
41+
context.addExtensions(Fortran77Language.class, Fortran90Language.class);
4342
context.addExtension(ICodeQualityProfiles.class);
4443
context.addExtensions(ICodePluginProperties.getProperties());
4544

0 commit comments

Comments
 (0)