Hi David,
If you managed to get rid of the warning in the UI then most probably the output in the analysis log is different now as well. Please post a new log, it’s hard to say anything without it.
Thanks.
Hi David,
If you managed to get rid of the warning in the UI then most probably the output in the analysis log is different now as well. Please post a new log, it’s hard to say anything without it.
Thanks.
@Michal_Duda here is the log. Let me know if you need additional information
You get this warning, which is probably the reason for lack of decoration:
Can you please make sure that:
OK @Michal_Duda I fixed the warning so no warnings at all now. The updated log is below. Just to be clear what i’m expected is for sonar to add comments to the PR where the new issues happen. I’ve added some unused local variables but there is no comment on them
[INFO] — sonar-maven-plugin:3.5.0.1254:sonar (default-cli) @ xxxxx-service —
[INFO] User cache: /home/ubuntu/.sonar/cache
[INFO] SonarQube version: 8.0.0
[INFO] Default locale: “en_US”, source code encoding: “UTF-8”
[INFO] Load global settings
[INFO] Load global settings (done) | time=155ms
[INFO] Server id: 74E9293D-AWHW8ct9-T_TB3XqouNu
[INFO] User cache: /home/ubuntu/.sonar/cache
[INFO] Load/download plugins
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=60ms
[INFO] Load/download plugins (done) | time=196ms
[INFO] Loaded core extensions: developer-scanner
[INFO] Process project properties
[INFO] Execute project builders
[INFO] Execute project builders (done) | time=4ms
[INFO] Project key: company_xxxxx-service
[INFO] Base dir: /data/workspace/xxxxx-service_sonar-config
[INFO] Working dir: /data/workspace/xxxxx-service_sonar-config/target/sonar
[INFO] Load project settings for component key: ‘company_xxxxx-service’
[INFO] Load project settings for component key: ‘company_xxxxx-service’ (done) | time=43ms
[INFO] Load project branches
[INFO] Load project branches (done) | time=15ms
[INFO] Load project pull requests
[INFO] Load project pull requests (done) | time=17ms
[INFO] Load branch configuration
[INFO] Load branch configuration (done) | time=10ms
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=59ms
[INFO] Detected Jenkins
[INFO] Load active rules
[INFO] Load active rules (done) | time=839ms
[INFO] Organization key: company
[INFO] Pull request 28 for merge into master from sonar-config
[INFO] SCM collecting changed files in the branch
[INFO] SCM collecting changed files in the branch (done) | time=103ms
[INFO] Indexing files…
[INFO] Project configuration:
[INFO] Indexing files of module ‘xxxxx-domain’
[INFO] Base dir: /data/workspace/xxxxx-service_sonar-config/xxxxx-domain
[INFO] Source paths: pom.xml, src/main/java
[INFO] Indexing files of module ‘xxxxx-persistence’
[INFO] Base dir: /data/workspace/xxxxx-service_sonar-config/xxxxx-persistence
[INFO] Source paths: pom.xml, src/main/java
[INFO] Test paths: src/test/java
[INFO] Indexing files of module ‘xxxxx-rest’
[INFO] Base dir: /data/workspace/xxxxx-service_sonar-config/xxxxx-rest
[INFO] Source paths: pom.xml, src/main/java
[INFO] Test paths: src/test/java
[INFO] Indexing files of module ‘xxxxx-service-client’
[INFO] Base dir: /data/workspace/xxxxx-service_sonar-config/xxxxx-service-client
[INFO] Source paths: pom.xml, src/main/java
[INFO] Test paths: src/test/java
[INFO] Indexing files of module ‘xxxxx-service’
[INFO] Base dir: /data/workspace/xxxxx-service_sonar-config
[INFO] Source paths: pom.xml
[INFO] 114 files indexed
[INFO] 0 files ignored because of scm ignore settings
[INFO] Quality profile for java: Sonar way
[INFO] Quality profile for xml: Sonar way
[INFO] ------------- Run sensors on module xxxxx-domain
[INFO] Load metrics repository
[INFO] Load metrics repository (done) | time=14ms
[INFO] Sensor JavaSquidSensor [java]
[INFO] Configured Java source version (sonar.java.source): 8
[INFO] JavaClasspath initialization
[INFO] JavaClasspath initialization (done) | time=14ms
[INFO] JavaTestClasspath initialization
[INFO] JavaTestClasspath initialization (done) | time=1ms
[INFO] Java Main Files AST scan
[INFO] 33 source files to be analyzed
[INFO] 33/33 source files have been analyzed
[WARNING] Classes not found during the analysis : [javax.annotation.meta.When]
[INFO] Java Main Files AST scan (done) | time=1729ms
[INFO] Java Test Files AST scan
[INFO] 0 source files to be analyzed
[INFO] Java Test Files AST scan (done) | time=9ms
[INFO] Sensor JavaSquidSensor [java] (done) | time=2339ms
[INFO] Sensor SurefireSensor [java]
[INFO] parsing [/data/workspace/xxxxx-service_sonar-config/xxxxx-domain/target/surefire-reports]
[INFO] Sensor SurefireSensor [java] (done) | time=1ms
[INFO] Sensor JaCoCoSensor [java]
[INFO] Sensor JaCoCoSensor [java] (done) | time=1ms
[INFO] Sensor JavaXmlSensor [java]
[INFO] 1 source files to be analyzed
[INFO] 0/0 source files have been analyzed
[INFO] Sensor JavaXmlSensor [java] (done) | time=161ms
[INFO] 1/1 source files have been analyzed
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=13ms
[INFO] Sensor XML Sensor [xml]
[INFO] 1 source files to be analyzed
[INFO] Sensor XML Sensor [xml] (done) | time=104ms
[INFO] Sensor JaCoCo XML Report Importer [jacoco]
[INFO] 1/1 source files have been analyzed
[INFO] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms
[INFO] ------------- Run sensors on module xxxxx-persistence
[INFO] Sensor JavaSquidSensor [java]
[INFO] Configured Java source version (sonar.java.source): 8
[INFO] JavaClasspath initialization
[INFO] JavaClasspath initialization (done) | time=2ms
[INFO] JavaTestClasspath initialization
[INFO] JavaTestClasspath initialization (done) | time=1ms
[INFO] Java Main Files AST scan
[INFO] 18 source files to be analyzed
[WARNING] Classes not found during the analysis : [javax.annotation.meta.When]
[INFO] 18/18 source files have been analyzed
[INFO] Java Main Files AST scan (done) | time=1253ms
[INFO] Java Test Files AST scan
[INFO] 5 source files to be analyzed
[INFO] 5/5 source files have been analyzed
[WARNING] Classes not found during the analysis : [javax.annotation.meta.When]
[INFO] Java Test Files AST scan (done) | time=242ms
[INFO] Sensor JavaSquidSensor [java] (done) | time=1510ms
[INFO] Sensor SurefireSensor [java]
[INFO] parsing [/data/workspace/xxxxx-service_sonar-config/xxxxx-persistence/target/surefire-reports]
[INFO] Sensor SurefireSensor [java] (done) | time=1ms
[INFO] Sensor JaCoCoSensor [java]
[INFO] Sensor JaCoCoSensor [java] (done) | time=0ms
[INFO] Sensor JavaXmlSensor [java]
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Sensor JavaXmlSensor [java] (done) | time=30ms
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=0ms
[INFO] Sensor XML Sensor [xml]
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Sensor XML Sensor [xml] (done) | time=17ms
[INFO] Sensor JaCoCo XML Report Importer [jacoco]
[INFO] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=0ms
[INFO] ------------- Run sensors on module xxxxx-service-client
[INFO] Sensor JavaSquidSensor [java]
[INFO] Configured Java source version (sonar.java.source): 8
[INFO] JavaClasspath initialization
[INFO] JavaClasspath initialization (done) | time=1ms
[INFO] JavaTestClasspath initialization
[INFO] JavaTestClasspath initialization (done) | time=1ms
[INFO] Java Main Files AST scan
[INFO] 17 source files to be analyzed
[INFO] 17/17 source files have been analyzed
[WARNING] Classes not found during the analysis : [javax.annotation.meta.When]
[INFO] Java Main Files AST scan (done) | time=499ms
[INFO] Java Test Files AST scan
[INFO] 4 source files to be analyzed
[INFO] 4/4 source files have been analyzed
[WARNING] Classes not found during the analysis : [javax.annotation.meta.When]
[INFO] Java Test Files AST scan (done) | time=174ms
[INFO] Sensor JavaSquidSensor [java] (done) | time=694ms
[INFO] Sensor SurefireSensor [java]
[INFO] parsing [/data/workspace/xxxxx-service_sonar-config/xxxxx-service-client/target/surefire-reports]
[INFO] Sensor SurefireSensor [java] (done) | time=0ms
[INFO] Sensor JaCoCoSensor [java]
[INFO] Sensor JaCoCoSensor [java] (done) | time=0ms
[INFO] Sensor JavaXmlSensor [java]
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Sensor JavaXmlSensor [java] (done) | time=21ms
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=1ms
[INFO] Sensor XML Sensor [xml]
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Sensor XML Sensor [xml] (done) | time=16ms
[INFO] Sensor JaCoCo XML Report Importer [jacoco]
[INFO] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=0ms
[INFO] ------------- Run sensors on module xxxxx-rest
[INFO] Sensor JavaSquidSensor [java]
[INFO] Configured Java source version (sonar.java.source): 8
[INFO] JavaClasspath initialization
[INFO] JavaClasspath initialization (done) | time=2ms
[INFO] JavaTestClasspath initialization
[INFO] JavaTestClasspath initialization (done) | time=1ms
[INFO] Java Main Files AST scan
[INFO] 26 source files to be analyzed
[WARNING] Classes not found during the analysis : [javax.annotation.meta.When]
[INFO] Java Main Files AST scan (done) | time=864ms
[INFO] 26/26 source files have been analyzed
[INFO] Java Test Files AST scan
[INFO] 6 source files to be analyzed
[INFO] 6/6 source files have been analyzed
[WARNING] Classes not found during the analysis : [javax.annotation.meta.When]
[INFO] Java Test Files AST scan (done) | time=265ms
[INFO] Sensor JavaSquidSensor [java] (done) | time=1148ms
[INFO] Sensor SurefireSensor [java]
[INFO] parsing [/data/workspace/xxxxx-service_sonar-config/xxxxx-rest/target/surefire-reports]
[INFO] Sensor SurefireSensor [java] (done) | time=0ms
[INFO] Sensor JaCoCoSensor [java]
[INFO] Sensor JaCoCoSensor [java] (done) | time=0ms
[INFO] Sensor JavaXmlSensor [java]
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Sensor JavaXmlSensor [java] (done) | time=22ms
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=0ms
[INFO] Sensor XML Sensor [xml]
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Sensor XML Sensor [xml] (done) | time=17ms
[INFO] Sensor JaCoCo XML Report Importer [jacoco]
[INFO] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=0ms
[INFO] ------------- Run sensors on module xxxxx-service
[INFO] Sensor JavaXmlSensor [java]
[INFO] 1 source files to be analyzed
[INFO] 1/1 source files have been analyzed
[INFO] Sensor JavaXmlSensor [java] (done) | time=20ms
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=0ms
[INFO] Sensor XML Sensor [xml]
[INFO] 1 source files to be analyzed
[INFO] Sensor XML Sensor [xml] (done) | time=6ms
[INFO] Sensor JaCoCo XML Report Importer [jacoco]
[INFO] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=0ms
[INFO] Sensor JavaSecuritySensor [security]
[INFO] Reading type hierarchy from: /data/workspace/xxxxx-service_sonar-config/target/sonar/ucfg2/java
[INFO] 1/1 source files have been analyzed
[INFO] Read 173 type definitions
[INFO] Reading UCFGs from: /data/workspace/xxxxx-service_sonar-config/target/sonar/ucfg2/java
[INFO] 13:15:34.828 Building Type propagation graph
[INFO] 13:15:34.848 Running Tarjan on 1137 nodes
[INFO] 13:15:34.852 Tarjan found 1137 components
[INFO] 13:15:34.865 Variable type analysis: done
[INFO] 13:15:34.867 Building Type propagation graph
[INFO] 13:15:34.879 Running Tarjan on 1137 nodes
[INFO] 13:15:34.88 Tarjan found 1137 components
[INFO] 13:15:34.882 Variable type analysis: done
[INFO] Analyzing 221 ucfgs to detect vulnerabilities.
[INFO] All rules entrypoints : 0 Retained UCFGs : 0
[INFO] rule: S5131, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S5131 done
[INFO] rule: S3649, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S3649 done
[INFO] rule: S2076, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S2076 done
[INFO] rule: S2091, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S2091 done
[INFO] rule: S2078, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S2078 done
[INFO] rule: S2631, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S2631 done
[INFO] rule: S5135, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S5135 done
[INFO] rule: S2083, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S2083 done
[INFO] rule: S5167, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S5167 done
[INFO] rule: S5144, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S5144 done
[INFO] rule: S5145, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S5145 done
[INFO] rule: S5146, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S5146 done
[INFO] rule: S5334, entrypoints: 0
[INFO] Visited 0 ucfgs in 0 ms, 0 steps
[INFO] rule: S5334 done
[INFO] Sensor JavaSecuritySensor [security] (done) | time=846ms
[INFO] Sensor CSharpSecuritySensor [security]
[INFO] Reading type hierarchy from: /data/workspace/xxxxx-service_sonar-config/target/ucfg_cs2
[INFO] Read 0 type definitions
[INFO] Reading UCFGs from: /data/workspace/xxxxx-service_sonar-config/target/ucfg_cs2
[INFO] No UCFGs have been included for analysis.
[INFO] Sensor CSharpSecuritySensor [security] (done) | time=0ms
[INFO] Sensor PhpSecuritySensor [security]
[INFO] Reading type hierarchy from: /data/workspace/xxxxx-service_sonar-config/target/sonar/ucfg2/php
[INFO] Read 0 type definitions
[INFO] Reading UCFGs from: /data/workspace/xxxxx-service_sonar-config/target/sonar/ucfg2/php
[INFO] No UCFGs have been included for analysis.
[INFO] Sensor PhpSecuritySensor [security] (done) | time=0ms
[INFO] ------------- Run sensors on project
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=27ms
[INFO] Sensor Java CPD Block Indexer
[INFO] Sensor Java CPD Block Indexer (done) | time=66ms
[INFO] SCM provider for this project is: git
[INFO] 1 files to be analyzed
[INFO] 1/1 files analyzed
[INFO] 36 files had no CPD blocks
[INFO] Calculating CPD for 58 files
[INFO] CPD calculation finished
[INFO] SCM writing changed lines
[INFO] SCM writing changed lines (done) | time=27ms
[INFO] Analysis report generated in 106ms, dir size=215 KB
[INFO] Analysis report compressed in 82ms, zip size=106 KB
[INFO] Analysis report uploaded in 25ms
[INFO] ANALYSIS SUCCESSFUL, you can browse https://sonarcloud.io/dashboard?id=company_xxxxx-service&pullRequest=28
[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 https://sonarcloud.io/api/ce/task?id=AWxDBZgr1QooIrGug2dS
[INFO] Analysis total time: 13.034 s
Unfortunately Bitbucket Cloud (unlike Bitbucket Server) doesn’t have an API to add inline comments to the PR yet. At the moment SonarCloud’s PR decoration adds a Quality Gate status to your PR with a link to SonarCloud where you can view all the issues.
Thanks for the clarification. Then this is now working fine
Hi @devine,
You are using SoanrQube and Bitbucket Server.
Can you start another thread on SonarQube section please?
Thanks,
Aurélie.
Is this still the case? I’m trying to get SonarCloud to add inline comments to a PR on Bitbucket Cloud, and it isn’t working (Pull request decoration did not happen. Failed to access Bitbucket Cloud, the repository or the Pull Request). The docs don’t really say if it’s possible or not, so it’d be good to clarify this before I continue.
What did you change, how did you resolve this?
I’m also experiencing an issue with pull request decoration. I do see the results in the right-hand sidebar, but right below the pull request description is this widget called “Code Quality” that just always displays “not analyzed on Sonarcloud yet…”.
I’m tried using the repo / owner UUID (including the curly brackets), but that didn’t change anything. My scan logs:
It seems that the documentation is not complete on how to achieve this and that it is required to read through the forums to pick up pieces of information here and there…