Cosmic compiler support on sonar cloud - static code analysis

Hi ,

I am trying to integrate sonar cloud.

  • VSTS
  • Local agent server

i am trying to run analysis on C language ,compiler is cosmic compiler and STVD IDE.

after adding all tasks, its failing.

complete log is below::

2020-07-09T11:10:30.4885773Z ##[section]Starting: Run Code Analysis
2020-07-09T11:10:30.5158167Z ==============================================================================
2020-07-09T11:10:30.5159081Z Task : Run Code Analysis
2020-07-09T11:10:30.5159746Z Description : Run scanner and upload the results to the SonarCloud server.
2020-07-09T11:10:30.5160406Z Version : 1.15.0
2020-07-09T11:10:30.5160856Z Author : sonarsource
2020-07-09T11:10:30.5162150Z Help : Version: 1.15.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

More Information
2020-07-09T11:10:30.5163999Z ==============================================================================
2020-07-09T11:10:31.7101214Z [command]C:\WINDOWS\system32\cmd.exe /D /S /C “C:\Projects\Agile_Rollout\VSTS_Agent\EETc_Agent\vsts-agent-win-x64-2.168.2\EET_work_folder_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.15.0\sonar-scanner\bin\sonar-scanner.bat”
2020-07-09T11:10:32.6738468Z INFO: Scanner configuration file: C:\Projects\Agile_Rollout\VSTS_Agent\EETc_Agent\vsts-agent-win-x64-2.168.2\EET_work_folder_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.15.0\sonar-scanner\bin…\conf\sonar-scanner.properties
2020-07-09T11:10:32.6844755Z INFO: Project root configuration file: C:\Projects\Agile_Rollout\VSTS_Agent\EETc_Agent\vsts-agent-win-x64-2.168.2\EET_work_folder\13\s\sonar-project.properties
2020-07-09T11:10:32.7776331Z INFO: SonarScanner 4.4.0.2170
2020-07-09T11:10:32.7777276Z INFO: Java 11.0.7 Oracle Corporation (64-bit)
2020-07-09T11:10:32.7777830Z INFO: Windows 10 10.0 amd64
2020-07-09T11:10:33.8547940Z INFO: User cache: C:\WINDOWS\ServiceProfiles\NetworkService.sonar\cache
2020-07-09T11:10:40.8069846Z INFO: Scanner configuration file: C:\Projects\Agile_Rollout\VSTS_Agent\EETc_Agent\vsts-agent-win-x64-2.168.2\EET_work_folder_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.15.0\sonar-scanner\bin…\conf\sonar-scanner.properties
2020-07-09T11:10:40.8080316Z INFO: Project root configuration file: C:\Projects\Agile_Rollout\VSTS_Agent\EETc_Agent\vsts-agent-win-x64-2.168.2\EET_work_folder\13\s\sonar-project.properties
2020-07-09T11:10:40.8124309Z INFO: Analyzing on SonarCloud
2020-07-09T11:10:40.8131527Z INFO: Default locale: “en_US”, source code encoding: “windows-1252” (analysis is platform dependent)
2020-07-09T11:10:41.9829084Z INFO: Load global settings
2020-07-09T11:10:42.9674677Z INFO: Load global settings (done) | time=985ms
2020-07-09T11:10:42.9819267Z INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
2020-07-09T11:10:42.9896064Z INFO: User cache: C:\WINDOWS\ServiceProfiles\NetworkService.sonar\cache
2020-07-09T11:10:42.9957133Z INFO: Load/download plugins
2020-07-09T11:10:42.9958468Z INFO: Load plugins index
2020-07-09T11:10:43.2684063Z INFO: Load plugins index (done) | time=273ms
2020-07-09T11:10:44.6182989Z INFO: Load/download plugins (done) | time=1623ms
2020-07-09T11:10:44.9109792Z INFO: Loaded core extensions: developer-scanner
2020-07-09T11:10:46.1322191Z INFO: Process project properties
2020-07-09T11:10:46.1447650Z INFO: Execute project builders
2020-07-09T11:10:46.1527875Z INFO: Execute project builders (done) | time=7ms
2020-07-09T11:10:46.1612563Z INFO: Project key: https://danfoss.visualstudio.com/CRO%20DevOps
2020-07-09T11:10:46.1615918Z INFO: Base dir: C:\Projects\Agile_Rollout\VSTS_Agent\EETc_Agent\vsts-agent-win-x64-2.168.2\EET_work_folder\13\s
2020-07-09T11:10:46.1618124Z INFO: Working dir: C:\Projects\Agile_Rollout\VSTS_Agent\EETc_Agent\vsts-agent-win-x64-2.168.2\EET_work_folder\13\s.scannerwork
2020-07-09T11:10:46.2996681Z INFO: Load project settings for component key: ‘https://danfoss.visualstudio.com/CRO%20DevOps
2020-07-09T11:10:46.5758916Z INFO: Load project settings for component key: ‘https://danfoss.visualstudio.com/CRO%20DevOps’ (done) | time=274ms
2020-07-09T11:10:46.7196228Z INFO: Found an active CI vendor: ‘Azure DevOps’
2020-07-09T11:10:46.7225119Z INFO: Load project branches
2020-07-09T11:10:46.9125027Z INFO: Load project branches (done) | time=189ms
2020-07-09T11:10:46.9182630Z INFO: Check ALM binding of project ‘https://danfoss.visualstudio.com/CRO%20DevOps
2020-07-09T11:10:47.0957896Z INFO: Detected project binding: NOT_BOUND
2020-07-09T11:10:47.0961532Z INFO: Check ALM binding of project ‘https://danfoss.visualstudio.com/CRO%20DevOps’ (done) | time=178ms
2020-07-09T11:10:47.0988415Z INFO: Load project pull requests
2020-07-09T11:10:47.2678922Z INFO: Load project pull requests (done) | time=169ms
2020-07-09T11:10:47.2707293Z INFO: Load branch configuration
2020-07-09T11:10:47.2731119Z INFO: Load branch configuration (done) | time=2ms
2020-07-09T11:10:47.3471745Z INFO: Load quality profiles
2020-07-09T11:10:47.5921014Z INFO: Load quality profiles (done) | time=241ms
2020-07-09T11:10:47.5978111Z INFO: Load active rules
2020-07-09T11:10:52.9600697Z INFO: Load active rules (done) | time=5363ms
2020-07-09T11:10:52.9983905Z INFO: Organization key: danfoss
2020-07-09T11:10:52.9997153Z INFO: Branch name: feature/dev-azure-pipelines, type: short living
2020-07-09T11:10:53.0259351Z INFO: SCM collecting changed files in the branch
2020-07-09T11:10:54.2613762Z INFO: SCM collecting changed files in the branch (done) | time=1234ms
2020-07-09T11:10:54.3286397Z INFO: Indexing files…
2020-07-09T11:10:54.3289981Z INFO: Project configuration:
2020-07-09T11:10:55.4652289Z INFO: 256 files indexed
2020-07-09T11:10:55.4664293Z INFO: 129 files ignored because of scm ignore settings
2020-07-09T11:10:55.4673047Z INFO: Quality profile for c: Sonar way
2020-07-09T11:10:55.4674198Z INFO: ------------- Run sensors on module CRO%20DevOps
2020-07-09T11:10:56.1343843Z INFO: Load metrics repository
2020-07-09T11:10:56.3173774Z INFO: Load metrics repository (done) | time=174ms
2020-07-09T11:10:59.6288427Z WARNING: An illegal reflective access operation has occurred
2020-07-09T11:10:59.6647722Z WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/WINDOWS/ServiceProfiles/NetworkService/.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte,int,int,java.security.ProtectionDomain)
2020-07-09T11:10:59.6668551Z WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
2020-07-09T11:10:59.6840495Z WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
2020-07-09T11:10:59.8005835Z
2020-07-09T11:11:03.2145635Z INFO: Sensor SonarCSS Rules [cssfamily]
2020-07-09T11:11:03.2187325Z INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
2020-07-09T11:11:03.2188876Z INFO: Sensor SonarCSS Rules [cssfamily] (done) | time=4ms
2020-07-09T11:11:03.2189589Z INFO: Sensor JavaXmlSensor [java]
2020-07-09T11:11:03.2291206Z INFO: Sensor JavaXmlSensor [java] (done) | time=9ms
2020-07-09T11:11:03.2292732Z INFO: Sensor HTML [web]
2020-07-09T11:11:03.2349584Z INFO: Sensor HTML [web] (done) | time=6ms
2020-07-09T11:11:03.2358014Z INFO: Sensor JaCoCo XML Report Importer [jacoco]
2020-07-09T11:11:03.2483947Z INFO: ‘sonar.coverage.jacoco.xmlReportPaths’ is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
2020-07-09T11:11:03.2486133Z INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
2020-07-09T11:11:03.2487178Z INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=11ms
2020-07-09T11:11:03.2488110Z INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
2020-07-09T11:11:03.2517232Z INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=5ms
2020-07-09T11:11:03.2522415Z INFO: Sensor CFamily [cpp]
2020-07-09T11:11:03.2523487Z INFO: CFamily plugin version: 6.11.0.19130
2020-07-09T11:11:03.2573639Z INFO: Using build-wrapper output: C:\Projects\Agile_Rollout\VSTS_Agent\EETc_Agent\vsts-agent-win-x64-2.168.2\EET_work_folder\13\s\bw-outputs\build-wrapper-dump.json
2020-07-09T11:11:03.2577983Z INFO: Available processors: 4
2020-07-09T11:11:03.2579753Z INFO: Using 4 threads for analysis according to value of “sonar.cfamily.threads” property.
2020-07-09T11:11:09.4144045Z INFO: Cache is explicitly disabled: Optional[false]
2020-07-09T11:11:09.4396449Z INFO: Subprocess(es) done in 21ms
2020-07-09T11:11:09.4428218Z INFO: 0 compilation units analyzed
2020-07-09T11:11:09.8891198Z INFO: ------------------------------------------------------------------------
2020-07-09T11:11:09.9674864Z INFO: EXECUTION FAILURE
2020-07-09T11:11:09.9727883Z INFO: ------------------------------------------------------------------------
2020-07-09T11:11:09.9890949Z INFO: Total time: 37.237s
2020-07-09T11:11:09.9914520Z INFO: Final Memory: 28M/97M
2020-07-09T11:11:09.9919915Z ##[error]ERROR: Error during SonarScanner execution
2020-07-09T11:11:09.9941682Z ERROR: Error during SonarScanner execution
2020-07-09T11:11:09.9944176Z
2020-07-09T11:11:09.9953839Z ##[error]java.lang.IllegalStateException: The “build-wrapper-dump.json” file was found empty. Please make sure that:

  • you are using the latest version of the build-wrapper and the CFamily analyzer
  • your compiler is supported
  • you are wrapping your build correctly
  • you are wrapping a full/clean build
  • if you are building your project inside a Docker container, build-wrapper is wrapping the build process inside the container and not wrapping the external Docker process
    2020-07-09T11:11:09.9959788Z java.lang.IllegalStateException: The “build-wrapper-dump.json” file was found empty. Please make sure that:
    2020-07-09T11:11:09.9962878Z * you are using the latest version of the build-wrapper and the CFamily analyzer
    2020-07-09T11:11:09.9964680Z * your compiler is supported
    2020-07-09T11:11:09.9966309Z * you are wrapping your build correctly
    2020-07-09T11:11:09.9968047Z * you are wrapping a full/clean build
    2020-07-09T11:11:09.9969753Z * if you are building your project inside a Docker container, build-wrapper is wrapping the build process inside the container and not wrapping the external Docker process
    2020-07-09T11:11:09.9972942Z ##[error]at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:388)
    2020-07-09T11:11:09.9986427Z at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:388)
    2020-07-09T11:11:10.0040116Z ##[error]at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:34)
    at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:78)
    at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:54)
    at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:68)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:108)
    at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:418)
    at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:414)
    at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:372)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:108)
    at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:126)
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:108)
    at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
    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(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    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)
    2020-07-09T11:11:10.0056623Z at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:34)
    2020-07-09T11:11:10.0057881Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:78)
    2020-07-09T11:11:10.0058922Z at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:54)
    2020-07-09T11:11:10.0059902Z at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:68)
    2020-07-09T11:11:10.0060935Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
    2020-07-09T11:11:10.0062466Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:108)
    2020-07-09T11:11:10.0063488Z at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:418)
    2020-07-09T11:11:10.0064456Z at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:414)
    2020-07-09T11:11:10.0065909Z at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:372)
    2020-07-09T11:11:10.0067193Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
    2020-07-09T11:11:10.0068332Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:108)
    2020-07-09T11:11:10.0069359Z at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:126)
    2020-07-09T11:11:10.0070564Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
    2020-07-09T11:11:10.0071721Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:108)
    2020-07-09T11:11:10.0072737Z at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
    2020-07-09T11:11:10.0073591Z at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
    2020-07-09T11:11:10.0074723Z at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
    2020-07-09T11:11:10.0075846Z at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2020-07-09T11:11:10.0076857Z at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    2020-07-09T11:11:10.0078020Z at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    2020-07-09T11:11:10.0079102Z at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    2020-07-09T11:11:10.0080158Z at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
    2020-07-09T11:11:10.0081165Z at com.sun.proxy.$Proxy0.execute(Unknown Source)
    2020-07-09T11:11:10.0085962Z ##[error]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)
    ERROR:
    ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
    2020-07-09T11:11:10.0090776Z
    2020-07-09T11:11:10.0091603Z at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
    2020-07-09T11:11:10.0097727Z at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
    2020-07-09T11:11:10.0098709Z at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
    2020-07-09T11:11:10.0099571Z at org.sonarsource.scanner.cli.Main.main(Main.java:61)
    2020-07-09T11:11:10.0100127Z ERROR:
    2020-07-09T11:11:10.0100772Z ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
    2020-07-09T11:11:10.2145122Z ##[error]The process ‘C:\Projects\Agile_Rollout\VSTS_Agent\EETc_Agent\vsts-agent-win-x64-2.168.2\EET_work_folder_tasks\SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1\1.15.0\sonar-scanner\bin\sonar-scanner.bat’ failed with exit code 1
    2020-07-09T11:11:10.2277876Z ##[section]Finishing: Run Code Analysis

Hello,

The list of supported compilers is available on this page: https://www.sonarsource.com/c/

Can you share some details about this “cosmic” compiler? For example, why do you have to use it instead of one of the compilers we support? In which domain this compiler is generally used?

Thanks
Alex

1 Like

Hello

Thank you for quick reply.
We have legacy source code for electronic controllers in refrigeration domain.
those developed based on STM8-Bit , STVD IDE and Cosmic complier.

It will be great if you help me.

http://www.cosmicsoftware.com/stm8.php

I have attached the links for the reference.

Hello,

There is nothing we can do to unlock you. As we don’t support Cosmic compiler, you simply can’t scan your project.

I moved your post into the “Suggest new features” section of this forum and created https://jira.sonarsource.com/browse/FR-20 to track the request and gather interest from other users.

Regards
Alex

Okay . I hope this will be considered.

Thank you :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.