-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Welcome to the sonar-icode-cnes-plugin wiki!
Sonar-icode-cnes-plugin is a SonarQube plugin integrating i-Code CNES results into SonarQube dashboard. i-Code CNES is a free open source code checker for Fortran and Shell, available here : https://github.com/lequal/i-CodeCNES
Required : git, Java 8 and maven 3.5.0 (or latest)
- Clone github repository :
git clone https://github.com/lequal/sonar-icode-cnes-plugin.git
- Build using maven from the project directory :
mvn clean install
- The generated plugin can be found into the target directory
(<sonar-icode-cnes-plugin_dir>/target)
- Copy the generated jar into
<SonarQube_installation_directory>/extensions/plugins
. - Restart SonarQube :
sonar restart
orservice sonar restart
- Check SonarQube logs :
tail -f <SonarQube_installation_directory>/logs/web.log
- Open SonarQube web interfaces
http://<SonarQube_installation_host_ip>:9000
orhttp://localhost:9000
if your are on the host machine - Select "Icode Quality Profile" and add selected i-Code CNES rules to the Profile.
For all project source files, run:
icode <source_file> > ./<report_dir>/source_file.res.out>
Where:
- The source file
<source_file.c>
shall have for extension .f, .f77, .f90 or .sh - The sub-directory
<report_dir>
is used to store ICode CNES stdout stream - The ICode CNES standard output stream shall be stored into a report file with the same name as the source file and a specific extension name
res.out
In your project directory, create sonar-project.properties file, containing the following items :
sonar.projectKey=<your project key>
sonar.projectName=<your project name>
sonar.projectVersion= <your project version>
# Comma-separated paths to directories with sources (required)
sonar.sources=.
# Tells SonarQube where the i-Code CNES analysis reports are
sonar.icode.reportsPath=<report_dir>
# Encoding of the source files
sonar.sourceEncoding=UTF-8
Once you got i-Code CNES results and sonar-project.properties configured, you can launch sonar scanner from you project directory : sonar-scanner
sonar-icode-cnes-plugin integrates all i-Code CNES Rules. For more information on rules definition, please look directly on i-Code CNES github page : https://github.com/lequal/i-CodeCNES
You can contribute to sonar-icode-cnes-plugin :
- following the defined CODE_OF_CONDUCT
- using the PULL_REQUEST_TEMPLATE
- using the ISSUE_TEMPLATE
Contact : [email protected]
Bugs and Feature requests : https://github.com/lequal/sonar-icode-cnes-plugin/issues
sonar-frama-c-plugin is under GNU GPL v3.