scan-build генерирует plist отчеты с предупреждениями, но sonarqube не показывает никаких ошибок, предупреждений и т. Д. НО только исходный код как таковой
- Я запускаю scan-build для проекта makefile
/usr/bin/scan-build -plist -v -o /myDir/analyzer_reports make all
Это сообщает о нескольких предупреждениях (ожидаемых), а также генерирует файлы plist в подкаталогах / myDir / analyzer_reports
2 warnings generated.
scan-build: Analysis run complete.
scan-build: Analysis results (plist files) deposited in '/myDir/analyzer_reports/2019-05-15-053618-3070-1'
- Теперь я запускаю команду сонара-сканера
/root/sonar-scanner/bin/sonar-scanner -Dsonar.projectKey=my-test -Dsonar.host.url=http://test-sonarqube.nnnn.com:9000 -Dsonar.login=DJJHQWGDHD -Dsonar.projectName=my-test -Dsonar.sources=/myDir/, -Dsonar.cxx.includeDirectories=/myDir/, -Dsonar.cxx.clangsa.reportPath=/myDir/analyzer_reports/*/*.plist -Dsonar.cfamily.threads=4 -Dsonar.cxx.missingIncludeWarnings=false -Dsonar.coverage.exclusions=**/** -X -Dsonar.verbose=true -Dsonar.log.level=TRACE -Dsonar.projectVersion=1.0.0.1
Это успешно выполняется, давая мне URL, но ни одно из предупреждений, о которых сообщает scan-build, не видно. Я мог видеть все мои исходные файлы на вкладке «code» sonarqube, но ни ошибок, ни ошибок, ни запахов кода на вкладке «Overview».
`INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_191 Oracle Corporation (64-bit)
INFO: Linux 3.10.0-957.12.1.el7.x86_64 amd64
INFO: User cache: /root/.sonar/cache
INFO: SonarQube server 7.1.0
INFO: Default locale: "en_US", source code encoding: "US-ASCII" (analysis is platform dependent)
INFO: Publish mode
INFO: Load global settings
INFO: Load global settings (done) | time=116ms
INFO: Server id: AWT-dfsdffsfsffsd
INFO: User cache: /root/.sonar/cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=89ms
INFO: Load/download plugins
INFO: Load/download plugins (done) | time=13ms
INFO: Process project properties
INFO: Load project repositories
INFO: Load project repositories (done) | time=110ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=53ms
INFO: Load active rules
INFO: Load active rules (done) | time=599ms
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=41ms
INFO: Project key: my-test
INFO: Project base dir: /myDir/
INFO: ------------- Scan my-test
INFO: Load server rules
INFO: Load server rules (done) | time=208ms
INFO: Base dir: /myDir/
INFO: Working dir: /myDir/.scannerwork
INFO: Source paths: .
INFO: Source encoding: US-ASCII, default locale: en_US
INFO: Index files
INFO: 11 files indexed
INFO: Quality profile for c++: Sonar way
INFO: Excluded sources for coverage:
INFO: **/**
INFO: Sensor C++ (Community) SquidSensor [cxx]
INFO: Sensor C++ (Community) SquidSensor [cxx] (done) | time=384ms
INFO: Sensor C++ (Community) Unit Test Results Import [cxx]
INFO: No unit test results property. Skip Sensor
INFO: Sensor C++ (Community) Unit Test Results Import [cxx] (done) | time=0ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=1ms
INFO: Sensor CPD Block Indexer
INFO: Sensor CPD Block Indexer (done) | time=0ms
INFO: SCM Publisher is disabled
INFO: 1 file had no CPD blocks
INFO: Calculating CPD for 2 files
INFO: CPD calculation finished
INFO: Analysis report generated in 154ms, dir size=56 KB
INFO: Analysis reports compressed in 38ms, zip size=16 KB
INFO: Analysis report uploaded in 107ms
INFO: ANALYSIS SUCCESSFUL, you can browse http://test-sonarqube.nnnn.com:9000/dashboard/index/my-test
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://test-sonarqube.nnnn.com:9000/api/ce/task?id=AWrExSqZRdtR98aNFXXX
INFO: Task total time: 3.206 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 5.159s
INFO: Final Memory: 7M/229M
INFO: ------------------------------------------------------------------------`
Я ожидал, что sonarqube покажет некоторые данные, связанные с предупреждениями