Сканирование MY SonarQube C ++ прошло успешно, но результаты помечают только Дубликаты, а остальные помечены - PullRequest
0 голосов
/ 23 января 2020

МОЕ сканирование SonarQube C ++ прошло успешно, но результаты помечают только «Дубликаты» и не помечают никакие другие, где, как кажется, что-то не так при сканировании. Я посмотрел на вывод Дженкинса и Фоновые задачи, ни у одного из них нет ошибок.

Кто-нибудь сталкивался с этим раньше? Как я могу преодолеть эту проблему?

Пожалуйста, дайте несколько советов. Заранее спасибо.

**sonar-project.properties**
# Default SonarQube server
sonar.host.url=xxxxxxxx

# Root project information
sonar.projectKey=xxxxxx
sonar.projectName=xxxx
sonar.projectVersion=1.0

# Metadata
sonar.links.homepage=
sonar.links.ci=xxxx
sonar.links.scm=xxxx
sonar.links.issue=xxxx

# Sources to scan
sonar.sourceEncoding=UTF-8
sonar.projectBaseDir=system
sonar.sources=xxxx
sonar.exclusions=xxxx

# SonarCFamily configuration
sonar.cfamily.build-wrapper-output=build_output
sonar.cfamily.threads=1
sonar.language=cpp
sonar.log.level=TRACE|DEBUG
**Jenkins Output**
INFO: Scanner configuration file: /opt/sonar-scanner-3.3.0.1492-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: /project-root/sonar-project.properties
INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_212 IcedTea (64-bit)
INFO: Linux 3.10.0-1062.4.3.el7.x86_64 amd64
INFO: SONAR_SCANNER_OPTS=-Djavax.net.ssl.trustStore=/usr/bin/sq.keystore -Djavax.net.ssl.trustStorePassword=changeit
INFO: User cache: ?/.sonar/cache
INFO: SonarQube server 7.9.1
INFO: Default locale: “en_US”, source code encoding: “UTF-8”
WARN: SonarScanner will require Java 11+ to run starting in SonarQube 8.x
INFO: Load global settings
INFO: Load global settings (done) | time=174ms
INFO: Server id: XXXXXXXXXXXXXXXX
INFO: User cache: /project-root/?/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=78ms
INFO: Load/download plugins (done) | time=6226ms
INFO: Loaded core extensions: developer-scanner
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=7ms
INFO: Project key: org.wabtec.pdsserver
INFO: Base dir: /project-root/system
INFO: Working dir: /project-root/system/.scannerwork
INFO: Load project settings for component key: ‘XXXXXXXXXXX’
INFO: Load project settings for component key: ‘XXXXXXXXX’ (done) | time=23ms
INFO: Load project branches
INFO: Load project branches (done) | time=21ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=15ms
INFO: Load branch configuration
INFO: Load branch configuration (done) | time=2ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=57ms
INFO: Load active rules
INFO: Load active rules (done) | time=786ms
INFO: Indexing files…
INFO: Project configuration:
INFO: Excluded sources: XXXXXXXXXXXXXXXXX
INFO: 10342 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 0 files ignored because of scm ignore settings
INFO: Quality profile for c: Sonar way
INFO: Quality profile for cpp: Sonar way
INFO: ------------- Run sensors on module PDS Server NS
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=22ms
INFO: Sensor JavaXmlSensor [java]
INFO: Sensor JavaXmlSensor [java] (done) | time=23ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=40ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=23ms
INFO: Sensor CFamily [cpp]
INFO: Using build-wrapper output: /project-root/build_output/build-wrapper-dump.json
INFO: Available processors: 8
INFO: Using 1 thread for analysis according to value of “sonar.cfamily.threads” property.
INFO: Load project repositories
INFO: Load project repositories (done) | time=145ms
WARN: Metric ‘comment_lines_data’ is deprecated. Provided value is ignored.
INFO: 0 compilation units analyzed
INFO: Sensor CFamily [cpp] (done) | time=16616ms
INFO: Sensor JavaSecuritySensor [security]
INFO: Reading type hierarchy from: /project-root/system/.scannerwork/ucfg2/java
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /project-root/system/.scannerwork/ucfg2/java
INFO: No UCFGs have been included for analysis.
INFO: Sensor JavaSecuritySensor [security] (done) | time=7ms
INFO: Sensor CSharpSecuritySensor [security]
INFO: Reading type hierarchy from: /project-root/system/ucfg_cs2
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /project-root/system/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: /project-root/system/.scannerwork/ucfg2/php
INFO: Read 0 type definitions
INFO: Reading UCFGs from: /project-root/system/.scannerwork/ucfg2/php
INFO: No UCFGs have been included for analysis.
INFO: Sensor PhpSecuritySensor [security] (done) | time=1ms
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=68ms
INFO: 548 files had no CPD blocks
INFO: Calculating CPD for 8453 files
INFO: CPD calculation finished
INFO: Analysis report generated in 2580ms, dir size=100 MB
INFO: Analysis report compressed in 14394ms, zip size=32 MB
INFO: Analysis report uploaded in 2595ms
INFO: ANALYSIS SUCCESSFUL, you can browse
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
INFO: Analysis total time: 52.906 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 1:02.029s
INFO: Final Memory: 58M/1665M
INFO: ------------------------------------------------------------------------

1 Ответ

0 голосов
/ 23 января 2020

Просто может дать вам направление, что искать. Вам необходимо установить плагины из Sonar Marketplace на сервере Sonar (поиск в пользовательском интерфейсе), потому что по умолчанию вы видите только датчик нулевого покрытия. Также вам нужно запустить модульные тесты (тесты должны поставляться с кодом), чтобы отправлять сгенерированные отчеты в Sonar, а также получать отчет о покрытии

...