Skip to content

Commit 221ed1b

Browse files
committed
update documentation for build and integration test
1 parent 29022bc commit 221ed1b

File tree

3 files changed

+82
-16
lines changed

3 files changed

+82
-16
lines changed

CONTRIBUTING.md

Lines changed: 79 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
# Contributing to i-Code CNES plugin for SonarQube
22
First off, thanks for taking the time to contribute!
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.
3+
The following is a set of guidelines for contributing to i-Code CNES plugin for SonarQube, which are hosted in the [CATLab organization](https://github.com/cnescatlab) 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.
44

55
#### Table Of Contents
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) 
10-
* [Pull Requests](#pull-requests)
11-
* [Git Commit Messages](#git-commit-messages)
6+
- [Contributing to i-Code CNES plugin for SonarQube](#contributing-to-i-code-cnes-plugin-for-sonarqube)
7+
- [Table Of Contents](#table-of-contents)
8+
- [Code of Conduct](#code-of-conduct)
9+
- [How Can I Contribute?](#how-can-i-contribute)
10+
- [Reporting Bugs](#reporting-bugs)
11+
- [How Do I Submit A (Good) Bug Report?](#how-do-i-submit-a-good-bug-report)
12+
- [Suggesting Enhancements](#suggesting-enhancements)
13+
- [How Do I Submit A (Good) Enhancement Suggestion?](#how-do-i-submit-a-good-enhancement-suggestion)
14+
- [Pull Requests](#pull-requests)
15+
- [Git Commit Messages](#git-commit-messages)
16+
- [Management of contributions](#management-of-contributions)
1217

1318
## Code of Conduct
14-
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.
19+
This project and everyone participating in it is governed by the [CATLab Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to us or [GitHub](https://github.com/contact/report-content).
1520

1621
## How Can I Contribute?
1722

1823
### Reporting Bugs
19-
Before creating bug reports, please check if the problem has already been reported.
24+
Before creating bug reports, please check if the problem has already been reported.
2025

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

2530
Explain the problem and include additional details to help maintainers reproduce the problem:
@@ -32,7 +37,7 @@ Explain the problem and include additional details to help maintainers reproduce
3237

3338
Provide more context by answering these questions:
3439
* **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?
35-
* 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).
40+
* 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/cnescatlab/sonar-icode-cnes-plugin/releases).
3641
* **Can you reliably reproduce the issue?** If not, provide details about how often the problem happens and under which conditions it normally happens.
3742

3843
Include details about your configuration and environment:
@@ -72,8 +77,69 @@ Enhancement suggestions are tracked as [GitHub issues](https://guides.github.com
7277

7378
All contributions are welcome. They are made via a *pull request* on the branch `dev` which is the branch of the next version.
7479

75-
* pull request with **major** changes must be approved by at least one maintainer of each team and the LEQUAL.
80+
* pull request with **major** changes must be approved by at least one maintainer of each team and the CATLab.
7681

7782
* pull requests with **minor** changes must be approved by at least one organization's member.
78-
83+
7984
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.
85+
86+
# Development
87+
## How to build
88+
89+
This plugin is mainly developped in Java* and build with maven**. It's main dependencies are [fr.cnes.icode.icode-library](https://github.com/cnescatlab/i-CodeCNES) and libraries for [SonarQube](https://docs.sonarsource.com/sonarqube-community-build/extension-guide/developing-a-plugin/plugin-basics/)
90+
91+
> \* Depending the version, the JDK version is written in the [pom.xml](pom.xml) ans the SonarQube compatibility is in the matrix: [matrix](README.md#run-i-code-automatically)
92+
>
93+
> \*\* the build for the release version are validated in maven 3.9.9
94+
95+
96+
The icode-library is available on github repository. You'll have to configured your maven settings.xml with a new repository like this:
97+
98+
```xml
99+
<repositories>
100+
<repository>
101+
<id>github</id>
102+
<url>https://maven.pkg.github.com/cnescatlab/*</url>
103+
</repository>
104+
</repositories>
105+
```
106+
107+
For all other dependencies, maven [central](https://central.sonatype.com/) is enough.
108+
109+
After that, you only have to launch the build command:
110+
111+
```bash
112+
mvn package
113+
```
114+
115+
The jar will be in the **target** folder.
116+
117+
## How to launch integration test
118+
119+
An integration test is written to validate the plugin in a SonarQube dockerized instance and with a Fortran scan.
120+
121+
** [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/) is needed for this integration test
122+
123+
There is 2 scripts to make the test:
124+
- The [it.sh](it/it.sh) to launch a SonarQube docker instance and install the local sonar-icode-cnes-plugin-<MAVEN_VERSION>.jar in this instance.
125+
- the [audit.sh](it/audit.sh) to make a sonar-scanner launch a Fortran 77 and Fortran 90 code in the [src](it/src/) folder. This script check f77 and f90 issues a shown by SonarQube using the API.
126+
127+
128+
The it script can use parameters:
129+
```bash
130+
$> ./it.sh -h
131+
132+
Usage: ./it.sh [sSh]
133+
134+
-h : Display help
135+
-s [SONAR-SCANNER] : Take Sonar-scanner tag image from https://hub.docker.com/r/sonarsource/sonar-scanner-cli. Default is the latest tag
136+
-S [SONARQUBE] : Take SonarQube tag image from https://hub.docker.com/_/sonarqube. Default is the community tag
137+
```
138+
139+
Example of launching :
140+
```bash
141+
cd it
142+
./it.sh -s 11.4.0.2044_7.2.0 -S lts-community
143+
```
144+
145+
> Be careful to choose version depending the [compatibility matrix](README.md#run-i-code-automatically)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Please report issues at https://github.com/leqcnescatlabual/i-CodeCNES/issues
8181
````
8282

8383
### How to contribute
84-
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.
84+
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.
8585

8686
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.
8787

it/it.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
usage(){
44
echo -e "\nUsage: $0 [sSh] \n"
55
echo "-h : Display help"
6-
echo "-s [SONAR-SCANNER] : Take Sonar-scanner tag image from https://hub.docker.com/r/sonarsource/sonar-scanner-cli"
7-
echo "-S [SONARQUBE] : Take SonarQube tag image from https://hub.docker.com/_/sonarqube"
6+
echo "-s [SONAR-SCANNER] : Take Sonar-scanner tag image from https://hub.docker.com/r/sonarsource/sonar-scanner-cli". Default is the latest tag
7+
echo "-S [SONARQUBE] : Take SonarQube tag image from https://hub.docker.com/_/sonarqube". Default is the community tag
88
}
99

1010
OPTSTRING=":s:S:h"

0 commit comments

Comments
 (0)