cnescatlab / sonar-icode-cnes-plugin Goto Github PK
View Code? Open in Web Editor NEWAdd capability to analyze Fortran & Shell in SonarQube through i-Code CNES.
License: GNU General Public License v3.0
Add capability to analyze Fortran & Shell in SonarQube through i-Code CNES.
License: GNU General Public License v3.0
User should be able to choose to autolaunch i-Code CNES on analysis.
User has to run i-Code CNES by himself before using sonar icode
/
1.0.2
Hi Team,
I have recently installed Icode-cnes-plugin on sonarqube-7.9 enerprise edition. This was installed as a part of requirement where one of the user wanted to analyse *.sh files for his project. As a part of testing post any plugin installation, i ran a maven analysis for a sample project. The analysis for this maven project failed with the below error:
"Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project maven--test1: The plugin [icode] does not support Java 1.8.0_242: fr/cnes/sonar/plugins/icode/ICodePlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -> [Help 1]"
Why is icode-cnes plugin used for a maven project where we have java files?
I ran another analysis for a different project which uses flow plugin and it was successful without any errors.
Please look into and kindly advise accordingly.
Note: Java version on the Linux client machine is java-1.8 and java-11. Attached are the screenshots:
Is your feature request related to a problem? Please describe.
When using custom i-Code plugin for SonarQube, it is impossible to execute an i-Code custom plugin.
Describe the solution you'd like
The plugin for SonarQube should support call of custom i-Code plugins to run them on demand..
Describe alternatives you've considered
none
Additional context
none
Number of comment lines must be exact.
Number of comment lines is not exact because of the computation is based on i-Code CommentRatio.
Waiting for i-Code 3.1.0.
Launch i-Code.
1.0.0-alpha
There are some dead links in the README (at least the links to the icode installation and user manual).
Result files can be every where in the project base directory.
Result files has to be in indexed files to be found.
Launch sonar-scanner on a project where:
sonar.sources=src/
sonar.tests=test/
sonar.framac.reports.path=result.csv
1.1.0
hi... thanks for the help
I have configured some analyzes and they are giving the errors, presented in the attached log, apparently due to a rule, which I have deactivated in the profile assigned to the project but it does still fail.
10:32:54.688 INFO: ------------------------------------------------------------------------
10:32:54 10:32:54.689 INFO: EXECUTION FAILURE
10:32:54 10:32:54.689 INFO: ------------------------------------------------------------------------
10:32:54 10:32:54.689 INFO: Total time: 16.560s
10:32:54 10:32:54.808 INFO: Final Memory: 425M/1773M
10:32:54 10:32:54.808 INFO: ------------------------------------------------------------------------
10:32:54 10:32:54.808 ERROR: Error during SonarScanner execution
10:32:54 java.lang.IndexOutOfBoundsException: Index: -1, Size: 1
10:32:54 at java.util.LinkedList.checkElementIndex(Unknown Source)
10:32:54 at java.util.LinkedList.get(Unknown Source)
10:32:54 at fr.cnes.icode.fortran90.rules.COMNAMEHomonymy.run(COMNAMEHomonymy.java:1477)
10:32:54 at fr.cnes.icode.Analyzer.stableCheck(Analyzer.java:224)
10:32:54 at fr.cnes.sonar.plugins.icode.check.ICodeSensor.executeEmbeddedICode(ICodeSensor.java:189)
10:32:54 at fr.cnes.sonar.plugins.icode.check.ICodeSensor.execute(ICodeSensor.java:110)
10:32:54 at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
10:32:54 at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)
10:32:54 at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)
10:32:54 at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)
10:32:54 at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88)
10:32:54 at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177)
10:32:54 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
10:32:54 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
10:32:54 at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)
10:32:54 at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)
10:32:54 at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)
10:32:54 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
10:32:54 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
10:32:54 at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
10:32:54 at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
10:32:54 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
10:32:54 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
10:32:54 at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
10:32:54 at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
10:32:54 at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
10:32:54 at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
10:32:54 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:32:54 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
10:32:54 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
10:32:54 at java.lang.reflect.Method.invoke(Unknown Source)
10:32:54 at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
10:32:54 at com.sun.proxy.$Proxy0.execute(Unknown Source)
10:32:54 at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
10:32:54 at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
10:32:54 at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
10:32:54 at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
10:32:54 at org.sonarsource.scanner.cli.Main.main(Main.java:61)
10:32:55 WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
10:32:55 ERROR: SonarQube scanner exited with non-zero code: 1
10:32:58 Finished: FAILURE
Please complete the following information.
Add any other context about the problem here.
Scanned result following readme instructions.
README.md does not contains enough information to run an analysis.
INFO: Source paths: Desktop/templar_Code/Test/home/templar/legacy/test.ksh
INFO: Source encoding: windows-1252, default locale: en_US
INFO: Load server rules
INFO: Load server rules (done) | time=530ms
INFO: Index files
INFO: 1 file indexed
INFO: Quality profile for shell: Sonar way
INFO: Sensor fr.cnes.sonar.plugins.icode.check.ICodeSensor [icode]
**WARN: Results file result.res has not been found and wont be processed.**
INFO: Sensor fr.cnes.sonar.plugins.icode.check.ICodeSensor [icode] (done) | time
=0ms
INFO: Sensor SonarJavaXmlFileSensor [java]
INFO: Sensor SonarJavaXmlFileSensor [java] (done) | time=0ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=0ms
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 125ms, dir size=35 KB
1.1.0
No analysis data must be logged in web browser.
Currently, analysis data are logged in web browser's console.
When trying to install the plugin with my installation of sonarqube 6.7.7 I get the following error
2020.04.02 15:38:38 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.IllegalStateException: Fail to load plugin Sonar i-Code CNES plugin [icode]
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:88)
at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:581)
at org.sonar.server.platform.Platform.start(Platform.java:211)
at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:185)
at org.sonar.server.platform.Platform.access$500(Platform.java:46)
at org.sonar.server.platform.Platform$1.lambda$doRun$0(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.runIfNotAborted(Platform.java:371)
at org.sonar.server.platform.Platform$1.doRun(Platform.java:119)
at org.sonar.server.platform.Platform$AutoStarterRunnable.run(Platform.java:355)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalStateException: Unable to register extension fr.cnes.sonar.plugins.icode.languages.ICodeQualityProfiles from plugin 'icode'
I've try with the releases 1.1.0, 1.0.2, 1.0.0.
User environment:
/opt/sonarqube/extensions/plugins# ll -tr
total 151648
-rw-r--r-- 1 sonarqube nobody 300101 Jul 20 2018 sonar-icode-cnes-plugin-1.0.0.jar
When analyzing multi-language project, metrics corresponding to a certain language must be displayed in its own widget.
Metrics are missing in F77 and F90 widgets and are false in SH widget.
Sonar-scanner execution must be free of errors.
Some errors appear during sonar-scanner analysis:
ERROR: Unexpected report analysis end element:analysisFile
ERROR: Unexpected report analysis end element:result
ERROR: Unexpected report analysis end element:result
ERROR: Unexpected report analysis end element:result
ERROR: Unexpected report analysis end element:result
Language field should be sufficient to known to which language a rule is relative to.
There are also tag 'f77', 'f90' ... in addition to language field.
See rules list.
1.0.1
First of all, thanks for the plugin ... I have installed it and I have successfully performed analysis of a source directory ... but I cannot configure it for recursive analysis of a directory with two subdir´s and several inside with the sources
Before posting a new question, please read the documentation](https://github.com/lequal/i-CodeCNES/wiki) and check existing issues
When I try to analyze a large project over 1 million lines in SonarQube 7.9 I get a 504 Timeout after a short period of time. I am able to analyze smaller projects fine but the larger projects timeout. Is there some configuration I need to change for this to complete?
If applicable, add screenshots to help explain your problem. Then, append i-Code log and do not forget to obfuscate them.
Please complete the following information.
Add any other context about the problem here.
Hello,
I hope you can help me
When I run a scan (sonar-scanner command or in a docker container sonarsource/sonar-scanner-cli
or lequal/sonar-scanner
) on a project containing some shell files, the scan execution crashes with the following error:
...
INFO: Sensor Sonar i-Code [icode]
INFO: Reflections took 182 ms to scan 12 urls, producing 26 keys and 242 values
INFO: Reflections took 139 ms to scan 12 urls, producing 26 keys and 242 values
INFO: Reflections took 114 ms to scan 12 urls, producing 26 keys and 242 values
INFO: Reflections took 103 ms to scan 12 urls, producing 26 keys and 242 values
INFO: Reflections took 94 ms to scan 12 urls, producing 26 keys and 242 values
INFO: Reflections took 100 ms to scan 12 urls, producing 26 keys and 242 values
INFO: Reflections took 95 ms to scan 12 urls, producing 26 keys and 242 values
INFO: Reflections took 94 ms to scan 12 urls, producing 26 keys and 242 values
INFO: Reflections took 92 ms to scan 12 urls, producing 26 keys and 242 values
INFO: Reflections took 108 ms to scan 12 urls, producing 26 keys and 242 values
INFO: Reflections took 97 ms to scan 12 urls, producing 26 keys and 242 values
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 8.222s
INFO: Final Memory: 562M/940M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
java.lang.StackOverflowError
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:424)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
...
I have this problem on 2 different projects, but it does not appear on all projects containing shell code.
This problem is not solved by disabling the COM.FLOW.Recursion rule in the associated quality profile
This problem does not occur anymore if I deactivate the i-Code CNES plugin.
The problem is difficult to reproduce because it appears only on certain projects, projects for which the sources cannot be shared.
Here is the stacktrace using the debug mode of sonar-scanner (argument -X
):
...
13:05:07.129 INFO: Reflections took 95 ms to scan 12 urls, producing 26 keys and 242 values
13:05:07.130 DEBUG: expanded subtype org.sonar.api.scanner.sensor.ProjectSensor -> org.sonar.api.batch.sensor.Sensor
13:05:07.130 DEBUG: expanded subtype java.lang.Throwable -> java.lang.Exception
13:05:07.130 DEBUG: expanded subtype java.io.Serializable -> java.lang.Throwable
13:05:07.130 DEBUG: expanded subtype com.thoughtworks.xstream.mapper.Mapper -> com.thoughtworks.xstream.mapper.MapperWrapper
13:05:07.130 DEBUG: expanded subtype com.thoughtworks.xstream.converters.Converter -> com.thoughtworks.xstream.converters.extended.ToAttributedValueConverter
13:05:07.130 DEBUG: expanded subtype com.thoughtworks.xstream.converters.ConverterMatcher -> com.thoughtworks.xstream.converters.Converter
13:05:07.130 DEBUG: expanded subtype org.sonar.api.resources.Language -> org.sonar.api.resources.AbstractLanguage
13:05:07.131 DEBUG: going to scan these urls:
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/icode-library-v4.1.0.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/shell-language-v4.1.0.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/fortran90-language-v4.1.0.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/fortran90-metrics-v4.1.0.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/shell-rules-v4.1.0.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/fortran77-rules-v4.1.0.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/icode-core-v4.1.0.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/fortran77-language-v4.1.0.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/fortran90-rules-v4.1.0.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/shell-metrics-v4.1.0.jar!/
jar:file:/home/***/.sonar/cache/89b582ef2b351828038c71cf4f0b877f/sonar-icode-plugin.jar_unzip/META-INF/lib/fortran77-metrics-v4.1.0.jar!/
13:05:07.243 INFO: Reflections took 112 ms to scan 12 urls, producing 26 keys and 242 values
13:05:07.244 DEBUG: expanded subtype org.sonar.api.scanner.sensor.ProjectSensor -> org.sonar.api.batch.sensor.Sensor
13:05:07.244 DEBUG: expanded subtype java.lang.Throwable -> java.lang.Exception
13:05:07.244 DEBUG: expanded subtype java.io.Serializable -> java.lang.Throwable
13:05:07.244 DEBUG: expanded subtype com.thoughtworks.xstream.mapper.Mapper -> com.thoughtworks.xstream.mapper.MapperWrapper
13:05:07.244 DEBUG: expanded subtype com.thoughtworks.xstream.converters.Converter -> com.thoughtworks.xstream.converters.extended.ToAttributedValueConverter
13:05:07.244 DEBUG: expanded subtype com.thoughtworks.xstream.converters.ConverterMatcher -> com.thoughtworks.xstream.converters.Converter
13:05:07.244 DEBUG: expanded subtype org.sonar.api.resources.Language -> org.sonar.api.resources.AbstractLanguage
13:05:09.425 INFO: ------------------------------------------------------------------------
13:05:09.425 INFO: EXECUTION FAILURE
13:05:09.425 INFO: ------------------------------------------------------------------------
13:05:09.425 INFO: Total time: 7.371s
13:05:09.483 INFO: Final Memory: 562M/939M
13:05:09.483 INFO: ------------------------------------------------------------------------
13:05:09.483 ERROR: Error during SonarScanner execution
java.lang.StackOverflowError
at java.base/java.util.ArrayList.indexOfRange(Unknown Source)
at java.base/java.util.ArrayList.indexOf(Unknown Source)
at java.base/java.util.ArrayList.contains(Unknown Source)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:426)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
at fr.cnes.icode.shell.rules.COMFLOWRecursion.checkCircularCalling(COMFLOWRecursion.java:433)
...
Run scan directly with the sonar-scanner command or in a docker container sonarsource/sonar-scanner-cli
or lequal/sonar-scanner
Upgrading the plugin to v2.0.2 causes analysis failures with SonarQube scanners older than version 4.0 because the plugin is compiled with Java 11 and the v3.x of the SonarQube Scanner has a v1.8 embedded JRE.
Update the documentation and release notes to indicate that a Java 11 JRE is required to use the plugin, not just that the plugin supports Java 11.
A clear and concise description of any alternative solutions or features you've considered.
Add any other context or screenshots about the feature request here.
sonaricode 1.1.0 should fully support i-Code 3.1.0 and its new rules.
Supported rules are those of i-Code 3.0.1.
1.0.2
A clear and concise description of what the bug is.
There are no more nesting metrics inMeasure
.
Steps to reproduce the behavior.
A clear and concise description of what you expected to happen.
Metric 'Nesting' should be displayed in Size category.
If applicable, add screenshots to help explain your problem. Then, append SonarQube and i-Code log and do not forget to obfuscate them.
Please complete the following information.
Add any other context about the problem here.
Describe the bug
Internal errors in i-Code checker make the analysis crash.
To reproduce
Run the SonarQube analysis on a file containing a known source of bug and with which i-Code throws exceptions.
Expected behavior
The plugin should:
Screenshots & log
10:37:49 INFO: Sensor fr.cnes.sonar.plugins.icode.check.ICodeSensor [sonaricode]
10:37:50 INFO: Reflections took 182 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 118 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 125 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 106 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 103 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 137 ms to scan 12 urls, producing 27 keys and 243 values
10:37:50 INFO: Reflections took 107 ms to scan 12 urls, producing 27 keys and 243 values
10:37:51 INFO: Reflections took 107 ms to scan 12 urls, producing 27 keys and 243 values
10:37:51 INFO: Reflections took 102 ms to scan 12 urls, producing 27 keys and 243 values
10:37:51 INFO: Reflections took 123 ms to scan 12 urls, producing 27 keys and 243 values
10:37:51 INFO: Reflections took 132 ms to scan 12 urls, producing 27 keys and 243 values
10:38:00 INFO: ------------------------------------------------------------------------
10:38:00 INFO: EXECUTION FAILURE
10:38:00 INFO: ------------------------------------------------------------------------
10:38:00 INFO: Total time: 14.485s
10:38:00 INFO: Final Memory: 419M/1185M
10:38:00 INFO: ------------------------------------------------------------------------
10:38:00 ERROR: Error during SonarQube Scanner execution
10:38:00 ERROR: Index: -1, Size: 1
10:38:00 ERROR:
10:38:00 ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
10:38:00 WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succedeed?
10:38:00 ERROR: SonarQube scanner exited with non-zero code: 1
10:38:03 Finished: FAILURE
User environment (please complete the following information):
Nesting metric should not be in a new metrics category but in an existing one: in 'Size' for example.
Nesting metric is in i-Code category.
See Measures view.
1.0.1
Since release 3.0, iCode provide rules related to metrics such as "SH.MET.LineOfCode, SH.MET.RatioComment, SH.MET.Nesting, SH.MET.ComplexitySimplified".
However, these rules are not provided by the Sonar plugin (see file "sonar-icode-cnes-plugin / src / main / resources / rules / icode-shell-rules.xml").
Please, do provide plugin with all rules available.
Provide a way in order to add these rule (update of icode-shell-rules.xml ?).
Thanx
The plugin must be able to import result file containing NaN for some metrics which is a nominal value given by i-Code. For example: when a function has lless than 10 lines, value for comment ratio is NaN.
The sonar-scanner's report can not be imported.
One clic allow to change the selected tab.
For the first change you need to click two time on a tab.
For the second change we are automatically redirected to the first tab.
Then, it's ok.
A clear and concise description of what the bug is.
Until now, sensor is activate if it detects default extensions files.
A clear and concise description of what you expected to happen.
Sensor should be activated on detection of file extensions from settings.
If applicable, add screenshots to help explain your problem. Then, append SonarQube and i-Code log and do not forget to obfuscate them.
Please complete the following information.
sonaricode properties must be editable at project level.
sonaricode properties are only editable at general level.
Try to edit a property for a specific project.
1.1.0
Metrics reported in the view must reflect what i-Code analysis report.
Only metrics on functions are reported and no metrics on global file are reused (anoying for script language like shell).
This plugin must be abble to import any file which is compliant to the official i-Code result XSD (analysisResultXsd.zip). For example: it must be able to import a file containing issues for multiple source files.
This plugin is not able to load all compliant result files: it can only load issues of a result file for only one source file.
According to SonarQube's Plugin Version Matrix version 2.0.2 should work with version 9.0. However I installed 9.1 today and the web interface fails. From web.log:
2021.08.30 17:04:03 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.server.exceptions.BadRequestException: Rule was removed: f77-rules:F77.DATA.Array
at org.sonar.server.exceptions.BadRequestException.create(BadRequestException.java:57)
at org.sonar.server.exceptions.BadRequestException.create(BadRequestException.java:61)
at org.sonar.server.exceptions.BadRequestException.checkRequest(BadRequestException.java:44)
at org.sonar.server.qualityprofile.RuleActivator.doActivate(RuleActivator.java:82)
at org.sonar.server.qualityprofile.RuleActivator.activate(RuleActivator.java:77)
at org.sonar.server.qualityprofile.BuiltInQProfileUpdateImpl.update(BuiltInQProfileUpdateImpl.java:73)
at org.sonar.server.qualityprofile.RegisterQualityProfiles.update(RegisterQualityProfiles.java:132)
at org.sonar.server.qualityprofile.RegisterQualityProfiles.lambda$start$1(RegisterQualityProfiles.java:93)
at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:405)
at org.sonar.server.qualityprofile.RegisterQualityProfiles.start(RegisterQualityProfiles.java:88)
at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:49)
at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:87)
at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:84)
at org.sonar.server.platform.PlatformImpl.executeStartupTasks(PlatformImpl.java:198)
at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$1(PlatformImpl.java:122)
at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:122)
at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
at java.base/java.lang.Thread.run(Thread.java:829)
2021.08.30 17:04:03 INFO web[][o.s.p.ProcessEntryPoint] Hard stopping process
After I removed the plugin the web interface came up. Any chance this can be quickly solved? Thanx
Hello... thanks for the help...
I have configured some analyzes and they are giving the errors, presented in the attached log, apparently due to a rule, which I have deactivated in the profile assigned to the project but it does still fail.
Please complete the following information.
03:11:52 03:11:52.863 INFO: ------------------------------------------------------------------------
03:11:52 03:11:52.863 INFO: EXECUTION FAILURE
03:11:52 03:11:52.863 INFO: ------------------------------------------------------------------------
03:11:52 03:11:52.863 INFO: Total time: 15.731s
03:11:53 03:11:53.001 INFO: Final Memory: 426M/1602M
03:11:53 03:11:53.001 INFO: ------------------------------------------------------------------------
03:11:53 03:11:53.001 ERROR: Error during SonarScanner execution
03:11:53 java.lang.IndexOutOfBoundsException: Index: -1, Size: 1
03:11:53 at java.util.LinkedList.checkElementIndex(Unknown Source)
03:11:53 at java.util.LinkedList.get(Unknown Source)
03:11:53 at fr.cnes.icode.fortran90.rules.COMNAMEHomonymy.run(COMNAMEHomonymy.java:1477)
03:11:53 at fr.cnes.icode.Analyzer.stableCheck(Analyzer.java:224)
03:11:53 at fr.cnes.sonar.plugins.icode.check.ICodeSensor.executeEmbeddedICode(ICodeSensor.java:189)
03:11:53 at fr.cnes.sonar.plugins.icode.check.ICodeSensor.execute(ICodeSensor.java:110)
03:11:53 at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
03:11:53 at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)
03:11:53 at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)
03:11:53 at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)
03:11:53 at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88)
03:11:53 at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177)
03:11:53 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
03:11:53 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
03:11:53 at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)
03:11:53 at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)
03:11:53 at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)
03:11:53 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
03:11:53 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
03:11:53 at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
03:11:53 at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
03:11:53 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
03:11:53 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
03:11:53 at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
03:11:53 at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
03:11:53 at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:71)
03:11:53 at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
03:11:53 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
03:11:53 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
03:11:53 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
03:11:53 at java.lang.reflect.Method.invoke(Unknown Source)
03:11:53 at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
03:11:53 at com.sun.proxy.$Proxy0.execute(Unknown Source)
03:11:53 at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
03:11:53 at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
03:11:53 at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
03:11:53 at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
03:11:53 at org.sonarsource.scanner.cli.Main.main(Main.java:61)
03:11:53 WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
03:11:53 ERROR: SonarQube scanner exited with non-zero code: 1
03:11:54 Finished: FAILURE
Is your feature request related to a problem? Please describe.
When using custom i-Code plugins, it is impossible to import the results in SonarQube.
Describe the solution you'd like
The plugin should support template rules to allow the user to add custom results coming from custom i-Code plugins or from other tool exporting results in i-Code format.
Describe alternatives you've considered
none
Additional context
none
SonarQube web apllication's CSS must not be impacted by plugin's CSS.
CSS of SonarQube's tables is overridden by plugin's CSS.
We have a project with the "too many open file" error in our SonarQube instance.
This bus was resolved in this issue : cnescatlab/i-CodeCNES#221
With the last plugin version 3.0.0. The embedded Icode is 4.1.0 But we would want the 4.1.1 version.
Generate a new plugin version with 4.1.2 Icode version.
Update the README too because it's not updated
Hello! Although the latest version of the plugin is not certified for SonarQube version > 9, I thought I'd give it a try and report back.
Unlike previous experiences, no errors anywhere are generated by the presence of plugin and analysis of Fortran code is attempted.
I've tried two mode of analysis:
The logs of both cases are attached, for simplicity's sake, as well as the reports which are different (I would expect them to be the same)
Let me know if I can help with getting this to work. We use this to maintain quality on our ocean models.
Cheers!
scanner_plugin.txt
[scanner_icode.txt](https://github.com/cnescatlab/sonar-icode-cnes-plugin/files/12524444/scanner_icode.tx
report_icode_xml.txt
t)
report_pluigin_xml.txt
Hello
My sonar-scanner analysis fails with "Java heap space" with F90 or F77 in the calltrace while there's no fortran at all in my code.
Our IT recently upgraded to sonarqube 7.9.5, and I had to upgrade my sonar-scanner from 3.2.0.1227 to 4.5.0.2216 to get it to work (Java was too old in sonar-scanner 3.2). First I got the following backtrace (full log at the end of https://ci.inria.fr/hwloc/job/extended/job/master/285/execution/node/418/log/)
12:35:44.178 ERROR: Error during SonarScanner execution
java.lang.OutOfMemoryError: Java heap space
at fr.cnes.icode.fortran90.rules.F90DATAConstantFloat.zzUnpackCMap(F90DATAConstantFloat.java:364)
at fr.cnes.icode.fortran90.rules.F90DATAConstantFloat.<clinit>(F90DATAConstantFloat.java:77)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at fr.cnes.icode.data.xml.XmlHandler.classFromString(XmlHandler.java:87)
at fr.cnes.icode.data.xml.XmlHandler.unmarshal(XmlHandler.java:53)
at fr.cnes.icode.data.CheckersDefinition.addFromResources(CheckersDefinition.java:108)
at fr.cnes.icode.fortran90.rules.Fortran90RulesDefinition.define(Fortran90RulesDefinition.java:27)
at fr.cnes.icode.data.CheckersDefinition.list(CheckersDefinition.java:45)
at fr.cnes.icode.services.checkers.CheckerService.getCheckers(CheckerService.java:60)
at fr.cnes.icode.services.checkers.CheckerService.getCheckers(CheckerService.java:166)
at fr.cnes.icode.Analyzer.stableCheck(Analyzer.java:91)
at fr.cnes.sonar.plugins.icode.check.ICodeSensor.executeEmbeddedICode(ICodeSensor.java:187)
at fr.cnes.sonar.plugins.icode.check.ICodeSensor.execute(ICodeSensor.java:109)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
This is running in a VM with 2GB of RAM so I added -Xmx1800m and got a slightly different failure (full log at the end of https://ci.inria.fr/hwloc/job/extended/job/master/286/execution/node/430/log/)
java.lang.OutOfMemoryError: Java heap space
at fr.cnes.icode.fortran77.rules.F77ERROpenRead.zzUnpackCMap(F77ERROpenRead.java:431)
at fr.cnes.icode.fortran77.rules.F77ERROpenRead.<clinit>(F77ERROpenRead.java:76)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at fr.cnes.icode.data.xml.XmlHandler.classFromString(XmlHandler.java:87)
at fr.cnes.icode.data.xml.XmlHandler.unmarshal(XmlHandler.java:53)
at fr.cnes.icode.data.CheckersDefinition.addFromResources(CheckersDefinition.java:108)
at fr.cnes.icode.fortran77.rules.Fortran77RulesDefinition.define(Fortran77RulesDefinition.java:27)
at fr.cnes.icode.data.CheckersDefinition.list(CheckersDefinition.java:45)
at fr.cnes.icode.services.checkers.CheckerService.getCheckers(CheckerService.java:60)
at fr.cnes.icode.services.checkers.CheckerService.getCheckers(CheckerService.java:166)
at fr.cnes.icode.Analyzer.stableCheck(Analyzer.java:91)
at fr.cnes.sonar.plugins.icode.check.ICodeSensor.executeEmbeddedICode(ICodeSensor.java:187)
at fr.cnes.sonar.plugins.icode.check.ICodeSensor.execute(ICodeSensor.java:109)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
It looks like further increasing -Xmx helps but I can't allocate the entire VM RAM to Java, or other things will start slowing down or failing.
Since we had no clue what was going on with Fortran, we tried disabling icode shell script analysis too (with sonar.icode.shell.file.suffixes=.noshell
) and this helps too. But this seems totally unrelated, I shouldn't need to disable shell checks to avoid Fortran issues :/
Is it expected to see those F90/F77 calls in the calltrace even when there is no Fortran code to analyze? Is this some static initialization that occurs before sonar-scanner finds out there's no Fortran code to analyze?
Are these allocations indeed big? It looks like there are XML files containing F77 and F90 rules, are those big, which could explain the issue?
Before posting a new question, please read the documentation](https://github.com/lequal/i-CodeCNES/wiki) and check existing issues
I would like to analyze shell scripts in my project using this plugin with the integration of sonarqube to gitlab. I have installed the plugin from marketplace as well as tried using the command line (/extensions/plugins). When I commit a code change to the git repository, the sonarscanner analyzes other languages in the project but with shell scripts, I am encountering the below error. Note: The sonarserver is running on an EC2 instance launched from the bitnami AMI. Is there anything that I am missing or done incorrectly?
ERROR: Caused by: fr/cnes/sonar/plugins/icode/ICodePlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Software versions
Describe the bug
When using a Sonar Scanner CLI version 4 (using JRE 11), analysis fails because of JAXB library.
It works with a Sonar Scanner CLI which use a JRE <
1.9
.
To reproduce
sonar-scanner -Dsonar.projectKey=myKey -Dsonar.sources=.
with a Sonar Scanner using Java 11
Expected behavior
The sonar-icode-cnes-plugin should work with sonar-scanner using JRE 9
, 10
and 11
.
Screenshots & log
SEVERE: [fr.cnes.icode] [ERROR] Class: fr.cnes.icode.fortran77.metrics.Fortran77MetricsDefinition
Method: addFromResources
javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:421)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662)
at fr.cnes.icode.data.XmlHandler.unmarshal(XmlHandler.java:53)
at fr.cnes.icode.data.CheckersDefinition.addFromResources(CheckersDefinition.java:108)
at fr.cnes.icode.fortran77.metrics.Fortran77MetricsDefinition.define(Fortran77MetricsDefinition.java:27)
at fr.cnes.icode.data.CheckersDefinition.list(CheckersDefinition.java:45)
at fr.cnes.icode.services.checkers.CheckerService.getCheckers(CheckerService.java:60)
at fr.cnes.icode.services.checkers.CheckerService.getCheckers(CheckerService.java:166)
at fr.cnes.icode.Analyzer.stableCheck(Analyzer.java:207)
at fr.cnes.sonar.plugins.icode.check.ICodeSensor.executeEmbeddedICode(ICodeSensor.java:189)
at fr.cnes.sonar.plugins.icode.check.ICodeSensor.execute(ICodeSensor.java:110)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:386)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:382)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:351)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory
at java.base/java.net.URLClassLoader.findClass(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedClassloader.loadClass(IsolatedClassloader.java:82)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:122)
at javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:155)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:276)
... 42 more
User environment (please complete the following information):
The i-Code 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 flder must be place at the same tree-level.
If SonarQube API offers this feature, the plugin should be able to calculate duplications.
Duplications are not calculated because i-Code does not calculate them.
Run an analysis.
1.0.1
When analyzing a project, sensor must browse all files in sub-folders.
Files in subfolders are ignored.
i tried to use the icode.bat included in the .zip of the i-code cnes 4.1.0 and it give me this error, from Jenkins....
ERROR: Cannot run program "K:/Repositories/_icode/icode.bat": CreateProcess error=206, El nombre del archivo o la extensión es demasiado largo
@Rem i-Code CNES Startup Script for Windows
@Rem
@Rem Required ENV vars:
@Rem JAVA_HOME - location of a JDK home dir
@echo off
set ERROR_CODE=0
@Rem set local scope for the variables with windows NT shell
@SETLOCAL
set "scriptdir=%dp0"-1%# == ## set scriptdir=%scriptdir:~0,-1%
if #%scriptdir:
set "ICODE_HOME=%scriptdir%"
@Rem ==== START VALIDATION ====
@Rem *** JAVA EXEC VALIDATION ***
if not "%JAVA_HOME%" == "" goto foundJavaHome
for %%i in (java.exe) do set JAVA_EXEC=%%~$PATH:i
if not "%JAVA_EXEC%" == "" (
set JAVA_EXEC="%JAVA_EXEC%"
goto OkJava
)
if not "%JAVA_EXEC%" == "" goto OkJava
echo.
echo ERROR: JAVA_HOME not found in your environment, and no Java
echo executable present in the PATH.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation, or add "java.exe" to the PATH
echo.
goto error
:foundJavaHome
if EXIST "%JAVA_HOME%\bin\java.exe" goto foundJavaExeFromJavaHome
echo.
echo ERROR: JAVA_HOME exists but does not point to a valid Java home
echo folder. No "\bin\java.exe" file can be found there.
echo.
goto error
:foundJavaExeFromJavaHome
set JAVA_EXEC="%JAVA_HOME%\bin\java.exe"
:OkJava
goto run
@Rem ==== START RUN ====
:run
set PROJECT_HOME=%CD%
@Rem remove trailing backslash, see https://groups.google.com/d/msg/sonarqube/wi7u-CyV_tc/3u9UKRmABQAJ
IF %PROJECT_HOME:~-1% == \ SET PROJECT_HOME=%PROJECT_HOME:~0,-1%
%JAVA_EXEC% -Djava.awt.headless=true -XX:-UseGCOverheadLimit -Xms1024M -Xmx1024M -cp %ICODE_HOME%*;%ICODE_HOME%\plugins* fr.cnes.icode.application.ICodeApplication %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
@Rem ==== END EXECUTION ====
:end
@Rem set local scope for the variables with windows NT shell
@endlocal & set ERROR_CODE=%ERROR_CODE%
@Rem see http://code-bear.com/bearlog/2007/06/01/getting-the-exit-code-from-a-batch-file-that-is-run-from-a-python-program/
goto exit
:returncode
exit /B %1
:exit
call :returncode %ERROR_CODE%
Please complete the following information.
Add any other context about the problem here.
Analysis should warn the user of the read of a unknown issue and continue import results.
Analysis failed if an issue on a unknown rule is present in the result file.
Rule analysis on a file with exotic rule ids.
1.0.2
With the plugin we should be able to differenciate all the three languages.
Therre is only one language called i-Code.
Install the plugin and go and see languages in quality profiles' page.
1.0.0-alpha
Fortran rules should have a description.
Fortran rules do not have a description.
See rules list.
1.0.1
Hi, I'm Carlos Mazo from EUMETSAT, colleague of Jordi Duatis, we talk today via email. Im trying to use the plugin for Sonarqube following the guide but I'm not succeeding. Could you give me some help, or examples please?
Thanks a lot!
Being able to see analysis results in SonarQube
Being able to auto-launch Fortran analysis
The plugin seems correctly loaded in Sonarqube, as I can see the Quality Profiles in the website.
Can't see analysis results in Sonarqube, when having results extracted manually (by executing the icode analyzer manually) following the plugin user manual
Can't get analysis results from auto-launch analysis, just getting some header of the results like the following:
<?xml version="1.0" encoding="UTF-8"?> <analysisProject analysisProjectName="Unknown" analysisProjectVersion="1.0.0"> <analysisInformations analysisConfigurationId="analysis1" analysisDate="2019-02-11" author="i-Code CNES Analyzer" /> </analysisProject>
Follow plugin documentation (probably I misunderstood something)
1.1.0
Code coverage must be > 80.0%.
Code coverage is about 40%.
See SonarCloud.
1.1.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.