cnescatlab / sonar-frama-c-plugin Goto Github PK
View Code? Open in Web Editor NEWsonar-frama-c-plugin is a plugin sonarqube to integrate frama-c results
License: GNU General Public License v3.0
sonar-frama-c-plugin is a plugin sonarqube to integrate frama-c results
License: GNU General Public License v3.0
A Frama-C result file is abble to provide information about multiple source file. This kind of file should be importable.
Results with data about multiple source file is not importable.
Try the plugin on this kind of result.
This plugin should have a simpler id to be integrate in the SonarQube marketplace.
The name contains '-'.
1.0.0
This plugin should be compatible with Frama-C 18 Chlorine.
This plugin is compatible with Frama-C 15.
1.0.0
will it work with sonarqube version 7.6?
INFO: User cache: /scratch/home/csi-install/.sonar/cache
INFO: SonarQube server 7.6.0
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/scratch/home/csi-install/.sonar/cache/993f707e3af7ba4f46f121039128516b/sonar-scanner-engine-shaded-7.6-all.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Load global settings (done) | time=94ms
INFO: User cache: /scratch/home/csi-install/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=65ms
INFO: Load/download plugins (done) | time=119ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=5ms
INFO: Project key: ORS_BRM
INFO: Base dir: /scratch/home/csi-install/sonar/test-brm/
INFO: Working dir: /scratch/home/csi-install/sonar/test-brm/.scannerwork
INFO: Load project settings
INFO: Load project settings (done) | time=17ms
INFO: Load project repositories
INFO: Load project repositories (done) | time=68ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=82ms
INFO: Load active rules
INFO: Load active rules (done) | time=2896ms
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=65ms
WARN: SCM provider autodetection failed. Please use "sonar.scm.provider" to define SCM of your project, or disable the SCM Sensor in the project settings.
INFO: Indexing files...
INFO: Project configuration:
INFO: Excluded sources: /custom/
INFO: 251 files indexed
INFO: 2188 files ignored because of inclusion/exclusion patterns
INFO: ------------- Run sensors on module ORS_BRM
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=6ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=5ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=19ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=48ms
INFO: ------------- Run sensors on project
INFO: No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
INFO: Calculating CPD for 0 files
INFO: CPD calculation finished
INFO: Analysis report generated in 116ms, dir size=73 KB
INFO: Analysis report compressed in 15ms, zip size=10 KB
INFO: Analysis report uploaded in 27ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=ORS_BRM
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AXyeMb1j7EUBF0lP8KTy
INFO: Analysis total time: 6.297 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 8.000s
INFO: Final Memory: 7M/27M
The Built-In quality profile should contains rules and should be named Sonar way.
The way use to declare the built-in quality profile is not correct. The good class is not used and it has a non common name.
1.0.0
A clear and concise description of what the bug is.
When running sonar-scanner
with the option sonar.projectBaseDir
, report files are not found.
Steps to reproduce the behavior.
frama-c file.c -rte -metrics -report-csv frama-c.csv > framac-results.out
sonar-project.properties
if not already done
sonar.projectKey=my-project
sonar.projectName=My Project
sonar.projectVersion=1.0
sonar.sources=src
sonar-scanner
from a different folder with the option sonar.projectBaseDir
sonar-scanner -Dsonar.projectBaseDir=/path/to/project
sonar-scanner
output, look for lines similar to
WARN: Results file frama-c.csv has not been found and wont be processed.
WARN: Results file framac-results.out has not been found and wont be processed.
This output tells us that result files were found when sonar-scanner
looks for files to collect but were not found later when trying to import then.
A clear and concise description of what you expected to happen.
The result files should be imported correctly. The base directory from which the sensor looks for these files should be sonar.projectBaseDir
.
If applicable, add screenshots to help explain your problem. Then, append SonarQube log and do not forget to obfuscate them._
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /usr/src/tests/c_cpp/sonar-project.properties
INFO: SonarScanner 4.4.0.2170
INFO: Java 11.0.8 Debian (64-bit)
INFO: Linux 4.15.0-112-generic amd64
INFO: User cache: /opt/sonar-scanner/.sonar/cache
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: /usr/src/tests/c_cpp/sonar-project.properties
INFO: Analyzing on SonarQube server 7.9.4
INFO: Default locale: "en_US", source code encoding: "US-ASCII" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=93ms
INFO: Server id: BF41A1F2-AXRsiTfL4ce7qAj-yTQm
INFO: User cache: /opt/sonar-scanner/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=37ms
INFO: Load/download plugins (done) | time=114ms
WARN: Plugin SonarQube CNES Report [cnesreport] uses a child first classloader which is deprecated
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=2ms
INFO: Project key: framac-dummy-project
INFO: Base dir: /usr/src/tests/c_cpp
INFO: Working dir: /usr/src/tests/c_cpp/.scannerwork
INFO: Load project settings for component key: 'framac-dummy-project'
INFO: Load project settings for component key: 'framac-dummy-project' (done) | time=96ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=49ms
INFO: Load active rules
INFO: Load active rules (done) | time=5404ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 7 files indexed
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for c++: CNES_CPP_A
INFO: ------------- Run sensors on module Frama-C Dummy Project
WARN: Component of type class org.sonar.plugins.findbugs.FindbugsConfiguration defines methods start() and/or stop(). Neither will be invoked to start/stop the component. Please implement either org.picocontainer.Startable or org.sonar.api.Startable
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=63ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/opt/sonar-scanner/.sonar/cache/866bb1adbf016ea515620f1aaa15ec53/sonar-javascript-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=1ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=9ms
INFO: Sensor SonarFrama-C [framac]
WARN: Results file .scannerwork/class-mapping.csv has not been found and wont be processed.
WARN: Results file frama-c.csv has not been found and wont be processed.
WARN: Results file framac-results.out has not been found and wont be processed.
WARN: No results file found for Frama-C.
INFO: Sensor SonarFrama-C [framac] (done) | time=9ms
INFO: Sensor C++ (Community) SquidSensor [cxx]
INFO: Load project repositories
INFO: Load project repositories (done) | time=12ms
WARN: Metric 'comment_lines_data' is deprecated. Provided value is ignored.
INFO: Sensor C++ (Community) SquidSensor [cxx] (done) | time=556ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=3ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=12ms
INFO: SCM provider for this project is: git
INFO: 7 files to be analyzed
INFO: 7/7 files analyzed
INFO: 6 files had no CPD blocks
INFO: Calculating CPD for 1 file
INFO: CPD calculation finished
INFO: Analysis report generated in 57ms, dir size=164 KB
INFO: Analysis report compressed in 26ms, zip size=35 KB
INFO: Analysis report uploaded in 72ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://lequalsonarqube:9000/dashboard?id=framac-dummy-project
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://lequalsonarqube:9000/api/ce/task?id=AXRskApY4ce7qAj-yajg
INFO: Executing post-job 'Final report'
INFO: Turn debug info on to get more details (sonar-scanner -X -Dsonar.verbose=true ...).
INFO: Analysis total time: 8.254 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 9.094s
INFO: Final Memory: 14M/57M
INFO: ------------------------------------------------------------------------
Please complete the following information.
Add any other context about the problem here.
The Frama-C result file must be named and placed independently from analyzed source files.
Currently, the result file must be named like the analyzed source file (+ result file extension) and the result folder must be place at the same tree-level.
Line of code covered by tests : min 80%
No major, critical or blocker issue.
Clean code.
There are issues and coverage is not enough to be published.
Read code and see https://sonarcloud.io/dashboard?id=fr.cnes.sonarqube.plugins%3Asonar-frama-c-plugin.
2.0.0-dev
There shouldn't be too much log.
There are too much log in sonar-scanner execution trace.
1.0.0
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Today, Frama-C plugin is not related C language defined by CFamily or sonar-cxx. It adds a new language with its own quality profiles.
A clear and concise description of what you want to happen.
Consider making it dependant of sonar-cxx or sonar-cfamily depending on which one is installed on the SonarQube instance and use their defined language.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Even if no C code is present Frama-C plugin execute itself during sonar-scanner call.
A clear and concise description of what you want to happen.
I would like to the plugin execute only when we analyze C code (or C++) or when plugin's property is set.
A clear and concise description of any alternative solutions or features you've considered.
None for now
Add any other context or screenshots about the feature request here.
None
There should be a consistent README.
There is no real README.
1.0.0
Metrics reported in the measure view must reflect what Frama-C export in analysis report.
Metrics import do not use standard SonarQube metrics but duplicate concepts by creating many new metrics to save few measures.
Connected to Issue #21
User should be able to configure the frama-c command line used by the AutoLaunch feature.
User has no way to set the command, it's hardcoded.
Install Plugin, and go in "Administration/Frama-C" window.
dev-ATOS
branch (2.0.0-dev)
Metrics should be displayed in standart SonarQube metrics.
There is a bad custom metrics view.
Look at the view.
User should be able to choose to autolaunch Frama-C on analysis.
User has to run Frama-C by himself before using sonar framac.
1.0.0
When analyzing a project, sensor must browse all files in sub-folders.
Files in subfolders are ignored.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
This plugin should be aligned with the Frama-C releases.
A clear and concise description of what you want to happen.
Add support of Frama-C 20.
sonar-cxx and sonar-framac should be able to run side by side.
There is a conflict between extension files that are associated to both c++(sonar-cxx) and frama-c(sonar-framac) languages. For example : *.c, *.h, *.i, etc.
Install both plugin and run an analysis.
1.0.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.