Skip to content

Commit ec95e5d

Browse files
authored
Merge pull request #52 from lequal/dev
sonaricode 2.0
2 parents 2fd1814 + 2434453 commit ec95e5d

37 files changed

+649
-209
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve this plugin
4+
title: ''
5+
labels: bug, to analyse
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots & log**
24+
If applicable, add screenshots to help explain your problem. Then, append SonarQube and i-Code log and **do not forget to obfuscate them**.
25+
26+
**User environment (please complete the following information):**
27+
- OS: [e.g. Windows 10]
28+
- Java version: [e.g. 1.8]
29+
- i-Code version: [e.g. 3.1.0]
30+
- Plugin version: [e.g. 2.0.0]
31+
32+
**Additional context**
33+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for improving this plugin
4+
title: ''
5+
labels: enhancement, to analyse
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
> A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
> A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
> A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
> Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Question
3+
about: Ask a question about the usage of this plugin
4+
title: ''
5+
labels: question
6+
assignees: ''
7+
8+
---
9+
10+
> **Before posting a new question, please read the documentation](https://github.com/lequal/i-CodeCNES/wiki) and check [existing issues](https://github.com/lequal/sonar-icode-cnes-plugin/issues)**
11+
12+
**Describe what you need to know**
13+
> A clear and concise description of what your question is.
14+
15+
**Screenshots & log**
16+
> If applicable, add screenshots to help explain your problem. Then, append i-Code log and **do not forget to obfuscate them**.
17+
18+
**User environment (please complete the following information):**
19+
- OS: [e.g. Windows 10]
20+
- Java version: [e.g. 1.8]
21+
- i-Code version: [e.g. 3.1.0]
22+
- Plugin version: [e.g. 2.0.0]
23+
24+
**Additional context**
25+
Add any other context about the problem here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Proposed changes
2+
3+
> Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
4+
5+
## Types of changes
6+
7+
What types of changes does your code introduce to this plugin?
8+
> _Put an `x` in the boxes that apply_
9+
10+
- [ ] Bugfix (non-breaking change which fixes an issue)
11+
- [ ] New feature (non-breaking change which adds functionality)
12+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
13+
- [ ] Documentation Update (if none of the other choices apply)
14+
15+
## Issues closed by changes
16+
17+
> _List here all issues closed by your changes. Use a list of items like `- [x] Close #0`_
18+
19+
- [x] Close #0
20+
21+
## Checklist
22+
23+
> _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
24+
25+
- [ ] I have read the [CONTRIBUTING](https://github.com/lequal/sonar-icode-cnes-plugin/blob/master/CONTRIBUTING.md) doc
26+
- [ ] I agree with the [CODE OF CONDUCT](https://github.com/lequal/sonar-icode-cnes-plugin/blob/master/CONTRIBUTING.md)
27+
- [ ] Lint and unit tests pass locally with my changes
28+
- [ ] SonarCloud and Travis CI tests pass with my changes
29+
- [ ] I have added tests that prove my fix is effective or that my feature works
30+
- [ ] I have added necessary documentation (if appropriate)
31+
- [ ] Any dependent changes have been merged and published in downstream modules
32+
33+
## Further comments
34+
35+
> If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

.travis.yml

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,35 @@
11
language: java
2-
32
sudo: false
43
install: true
54

5+
addons:
6+
sonarcloud:
7+
organization: "lequal"
8+
69
jdk:
7-
- openjdk8
8-
- openjdk11
10+
- openjdk8
11+
- openjdk11
12+
13+
script:
14+
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar
915

1016
cache:
1117
directories:
12-
- '$HOME/.m2/repository'
13-
- '$HOME/.sonar/cache'
14-
- '$HOME/.sonar/installs'
15-
16-
addons:
17-
sonarqube: true
18+
- '$HOME/.m2/repository'
19+
- '$HOME/.sonar/cache'
1820

1921
notifications:
2022
email: false
2123

22-
addons:
23-
sonarcloud:
24-
organization: "lequal"
25-
token:
26-
secure: projettest # encrypted value of your token
27-
# Script to execute.
28-
29-
script:
30-
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=lequal -Dsonar.login=181e22946e5e05302ceb4513dae3dcc9f7161f2f
24+
deploy:
25+
provider: releases
26+
api_key: "$GITHUB_TOKEN"
27+
file_glob: true
28+
file: "target/sonar-icode-cnes-plugin-*.jar"
29+
skip_cleanup: true
30+
name: "Sonar i-Code CNES plugin"
31+
draft: true
32+
on:
33+
branch: master
34+
tags: true
35+
jdk: 'openjdk11'

CONTRIBUTING.md

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,28 @@
1-
# Contributing to sonar-icode-cnes-plugin
2-
1+
# Contributing to i-Code CNES plugin for SonarQube
32
First off, thanks for taking the time to contribute!
4-
5-
The following is a set of guidelines for contributing to sonar-icode-cnes-plugin, which are hosted in the [Lequal Organization](https://github.com/lequal) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
3+
The following is a set of guidelines for contributing to i-Code CNES plugin for SonarQube, which are hosted in the [Lequal Organization](https://github.com/lequal) on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
64

75
#### Table Of Contents
8-
9-
[Code of Conduct](#code-of-conduct)
10-
11-
[How Can I Contribute?](#how-can-i-contribute)
12-
* [Reporting Bugs](#reporting-bugs)
13-
* [Suggesting Enhancements](#suggesting-enhancements)
6+
+ [Code of Conduct](#code-of-conduct)
7+
+ [How Can I Contribute?](#how-can-i-contribute) 
8+
* [Reporting Bugs](#reporting-bugs) 
9+
* [Suggesting Enhancements](#suggesting-enhancements) 
1410
* [Pull Requests](#pull-requests)
15-
16-
[Git Commit Messages](#git-commit-messages)
11+
* [Git Commit Messages](#git-commit-messages)
1712

1813
## Code of Conduct
19-
2014
This project and everyone participating in it is governed by the [Lequal Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to [[email protected]](mailto:[email protected]).
2115

2216
## How Can I Contribute?
2317

2418
### Reporting Bugs
25-
2619
Before creating bug reports, please check if the problem has already been reported.
2720

2821
#### How Do I Submit A (Good) Bug Report?
29-
30-
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/). Provide information by filling [the template](ISSUE_TEMPLATE.md).
22+
Bugs are tracked as [GitHub issues](https://guides.github.com/features/issues/).
23+
Provide information by filling [the template](.github/ISSUE_TEMPLATE/bug_report.md).
3124

3225
Explain the problem and include additional details to help maintainers reproduce the problem:
33-
3426
* **Use a clear and descriptive title** for the issue to identify the problem.
3527
* **Describe the exact steps which reproduce the problem** in as many details as possible. When listing steps, don't just say what you did, but explain how you did it.
3628
* **Provide specific examples to demonstrate the steps**. Include links to files or GitHub projects, which you use in those examples.
@@ -39,43 +31,49 @@ Explain the problem and include additional details to help maintainers reproduce
3931
* **If you're reporting that the plugin crashed**, include a crash report with a stack trace from the operating system.
4032

4133
Provide more context by answering these questions:
42-
4334
* **Did the problem start happening recently** (e.g. after updating to a new version of the plugin or SonarQube) or was this always a problem?
4435
* If the problem started happening recently, **can you reproduce the problem in an older version?** What's the most recent version in which the problem doesn't happen? You can download older versions from [the releases page](https://github.com/lequal/sonar-icode-cnes-plugin/releases).
4536
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
4637

4738
Include details about your configuration and environment:
48-
4939
* **Which SonarQube version are you using?** You can get the exact version at the bottom of your SonarQube instance.
5040

5141
### Suggesting Enhancements
52-
5342
Before creating enhancement suggestions, please check if the problem has already been suggested.
5443

5544
#### How Do I Submit A (Good) Enhancement Suggestion?
56-
5745
Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). To submit en enhancement suggestion, create an issue and provide the following information:
58-
5946
* **Use a clear and descriptive title** for the issue to identify the suggestion.
6047
* **Provide a step-by-step description of the suggested enhancement** in as many details as possible.
6148
* **Provide specific examples to demonstrate the steps**. Include copy/pasteable snippets which you use in those examples, as [Markdown code blocks](https://help.github.com/articles/markdown-basics/#multiple-lines).
6249
* **Describe the current behavior** and **explain which behavior you expected to see instead** and why.
6350
* **Include screenshots and animated GIFs** which help you demonstrate the steps or point out the part of Atom which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux.
6451
* **Explain why this enhancement would be useful**
6552
* **Specify which version you're using.**
66-
* **Specify the SonarQube version you're using.** The SonarQube version is mentionned at the bottom of the web page.
53+
* **Specify the SonarQube version you're using.** The SonarQube version is mentioned at the bottom of the web page.
6754

6855
### Pull Requests
69-
70-
* Fill in [the required template](PULL_REQUEST_TEMPLATE.md)
56+
* Fill in [the required template](.github/PULL_REQUEST_TEMPLATE.md)
7157
* Do not include issue numbers in the PR title
72-
* Include screenshots and animated GIFs in your pull request whenever possible.
73-
* Follow the Java styleguides.
74-
75-
## Git Commit Messages
58+
* Include screenshots and animated GIFs in your pull request whenever possible
59+
* Follow the Java styleguides and fix all new SonarCloud issues
60+
* Test your code before opening the PR
61+
* Set the current `dev-*` branch as the target branch for your PR
7662

63+
### Git Commit Messages
64+
* Start with the issue you are handling ("#187 ...")
7765
* Use the present tense ("Add feature" not "Added feature")
7866
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
7967
* Limit the first line to 72 characters or less
8068
* Reference issues and pull requests liberally after the first line
8169
* When only changing documentation, include `[ci skip]` in the commit description
70+
71+
## Management of contributions
72+
73+
All contributions are welcome. They are made via a *pull request* on the branch `dev` which is the branch of the next version.
74+
75+
* pull request with **major** changes must be approved by at least one maintainer of each team and the LEQUAL.
76+
77+
* pull requests with **minor** changes must be approved by at least one organization's member.
78+
79+
All maintainers have the ability to merge *pull requests* on the `dev` branch. If several maintainers belong to the same team, their validation only counts for one organization.

ISSUE_TEMPLATE.md

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

PULL_REQUEST_TEMPLATE.md

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

README.md

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,49 @@
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 import i-Code results for Fortran (77 & 90) & Shell.
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.
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

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

1616
### Quickstart
1717
- Setup a SonarQube instance.
18-
- Install i-Code command line application as described in [official documentation](https://github.com/lequal/i-CodeCNES/blob/master/documentation/i-Code%20CNES%20-%20Installation%20Manual%20-%20EN.pdf).
18+
- **[Optional]** Install i-Code command line application as described in [official documentation](https://github.com/lequal/i-CodeCNES/blob/master/documentation/i-Code%20CNES%20-%20Installation%20Manual%20-%20EN.pdf).
1919
- Install `sonaricode-*.jar` in `<SONARQUBE_HOME>/extensions/plugins/`.
20-
- Run i-Code manually or configure auto-launch in plugin configuration.
20+
- **[Optional]** Run i-Code manually or configure auto-launch in plugin configuration.
2121
- Run an analysis with *sonar-scanner*, *maven*, *gradle*, *msbuild*, etc.
2222

23+
#### Run i-Code automatically
24+
This SonarQube plugin is now able to run automaticcaly an embedded version of i-Code. If you do not specify properties to run i-Code [manually](#run-i-Code-manually) or [from a specific version](#Run-a-specific-i-Code-version-through-sonaricode-plugin), embedded version of i-Code will be executed.
25+
26+
Here is the compatibility matrix of the plugin:
27+
28+
| sonaricode version | embedded i-Code version |
29+
|:------------------:|:-----------------------:|
30+
| < 2.0.0 | none |
31+
| 2.0.0 | 4.0.0 |
32+
33+
#### Run i-Code manually
34+
If you need help to run i-Code please refer to the [official user manual](https://github.com/lequal/i-CodeCNES/blob/master/documentation/i-Code%20CNES%20-%20User%20Manual.pdf) or [i-Code issue tracker](https://github.com/lequal/i-CodeCNES/issues).
35+
36+
#### Run a specific i-Code version through sonaricode plugin
37+
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:
38+
- `sonar.icode.launch`: Activate autolaunch for i-Code if `true`. Default: `false`.
39+
- `sonar.icode.path`: Define i-Code CNES executable path to auto-launch it on analysis. Default: `${HOME}/icode-cnes/icode.exe`.
40+
41+
#### Other plugin's properties
42+
- `sonar.icode.shell.file.suffixes`: List of suffixes for Shell files to analyze. Default: `.sh,.ksh,.bash`.
43+
- `sonar.icode.f77.file.suffixes`: List of suffixes for F77 files to analyze. Default: `.f,.f77,.for,.fpp,.ftn,.F,.F77,.FOR,.FPP,.FTN`.
44+
- `sonar.icode.f90.file.suffixes`: List of suffixes for F90 files to analyze. Default: `.f90,.F90`.
45+
- `sonar.icode.reports.path`: Path to the i-Code reports. Multiple path can be provided. Default: `result.res`.
46+
47+
### Features
48+
- Fortran 77 analysis
49+
- Fortran 90 analysis
50+
- Shell analysis
51+
- Import i-Code results
52+
2353
#### Get i-Code help
2454
Use `icode -h` to get the following help about i-Code:
2555
````
@@ -41,25 +71,6 @@ Analyze Shell, F77 & F90 code to find defects & bugs.
4171
Please report issues at https://github.com/lequal/i-CodeCNES/issues
4272
````
4373

44-
#### Run i-Code manually
45-
If you need help to run i-Code please refer to the [official user manual](https://github.com/lequal/i-CodeCNES/blob/master/documentation/i-Code%20CNES%20-%20User%20Manual.pdf) or [i-Code issue tracker](https://github.com/lequal/i-CodeCNES/issues).
46-
47-
#### Run i-Code through sonaricode plugin
48-
In order to run i-Code automatically when running *sonar-scanner*, following SoanrQube properties have to be given:
49-
- `sonar.icode.launch`: Activate autolaunch for i-Code if `true`. Default: `false`.
50-
- `sonar.icode.path`: Define i-Code CNES executable path to auto-launch it on analysis. Default: `${HOME}/icode-cnes/icode.exe`.
51-
52-
#### Other plugin's properties
53-
- `sonar.icode.shell.file.suffixes`: List of suffixes for Shell files to analyze. Default: `.sh,.ksh,.bash`.
54-
- `sonar.icode.f77.file.suffixes`: List of suffixes for F77 files to analyze. Default: `.f,.f77,.for,.fpp,.ftn,.F,.F77,.FOR,.FPP,.FTN`.
55-
- `sonar.icode.f90.file.suffixes`: List of suffixes for F90 files to analyze. Default: `.f90,.F90`.
56-
- `sonar.icode.reports.path`: Path to the i-Code reports. Multiple path can be provided. Default: `result.res`.
57-
58-
### Features
59-
- Fortran 77 analysis
60-
- Fortran 90 analysis
61-
- Shell analysis
62-
6374
### How to contribute
6475
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.
6576

documentation/Présentation.pptx

-1.32 MB
Binary file not shown.

0 commit comments

Comments
 (0)