C 我想在SonarQube中显示一个整洁的解析报告,但加载后并没有输出
我想使用“C++(社区)”插件在SonarQube(社区版)中显示一个整洁的解析报告。但加载后没有输出。在sonarcub中,我需要显示铿锵整洁的报告,无需分析 文件sonar-project.properties:C 我想在SonarQube中显示一个整洁的解析报告,但加载后并没有输出,c,build,sonarqube,llvm,clang-tidy,C,Build,Sonarqube,Llvm,Clang Tidy,我想使用“C++(社区)”插件在SonarQube(社区版)中显示一个整洁的解析报告。但加载后没有输出。在sonarcub中,我需要显示铿锵整洁的报告,无需分析 文件sonar-project.properties: sonar.projectKey=myProject sonar.cxx.clangtidy.reportPath=clang-tidy-report sonar.cxx.errorRecoveryEnabled=True sonar.verbose=true sonar.cxx
sonar.projectKey=myProject
sonar.cxx.clangtidy.reportPath=clang-tidy-report
sonar.cxx.errorRecoveryEnabled=True
sonar.verbose=true
sonar.cxx.jsonCompilationDatabase=compile_commands.json
#----- Default SonarQube server
sonar.host.url=http://localhost:9000/
我在bash中使用了:
构建包装器:
build-wrapper --out-dir bw-outputs ./build.sh
并使用声纳QUBE扫描仪:
sonar-scanner
我发现这个网站展示了如何使用分析器:
控制台输出:
12:26:26.972 INFO: Analysis report uploaded in 112ms
12:26:26.981 DEBUG: Report metadata written to
/home/bivk/bivk_merge/bivk_bootloader/.scannerwork/report-task.txt
12:26:26.981 INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=bootloder
12:26:26.981 INFO: Note that you will be able to access the updated dashboard once the server has
processed the submitted analysis report
12:26:26.981 INFO: More about the report processing at http://localhost:9000/api/ce/task?
id=AXkiurWiHwwwwqfrQgb
12:26:26.992 DEBUG: Post-jobs : Final report
12:26:26.992 INFO: Executing post-job 'Final report'
12:26:26.992 WARN: Preprocessor: 4 include directive error(s). This is only relevant if parser
creates
syntax errors. The preprocessor searches for include files in the with
'sonar.cxx.includeDirectories'
defined directories and order.
12:26:26.992 WARN: Source code parser: 2 syntax error(s) detected. Syntax errors could cause
invalid
software metric values. Root cause are typically missing includes, missing macros or compiler
specific
extensions.
12:26:26.998 INFO: Analysis total time: 35.382 s
12:26:27.002 INFO: ------------------------------------------------------------------------
12:26:27.003 INFO: EXECUTION SUCCESS
它说你的代码没有编译。我编译了这段代码GCC,我没有问题OK,但是:
12:26:26.992警告:源代码解析器:检测到2个语法错误。
我解释为“它没有编译”。不确定为什么这是一个警告;如果它不编译,它也不会运行。我假设这是一个静态代码分析器?请注意,语法错误是它报告的最后一个问题;它似乎没有作进一步的分析。