gpt4 book ai didi

c++ - 我可以在哪里获得在 Linux 上对 C++ 代码运行 Sonar 库代码分析的步骤

转载 作者:太空宇宙 更新时间:2023-11-04 03:34:28 24 4
gpt4 key购买 nike

下面是我运行 Sonar 运行程序时的日志:

[OMC3_B12_LINUX6] sonar@omclinux03> ./sonar-runner SonarQube Runner 2.4 Java 1.6.0_22 Sun Microsystems Inc. (64-bit) Linux 2.6.32-220.el6.x86_64 amd64 INFO: Runner configuration file: /home/sonar/sonar/sonar-runner-2.4/conf/sonar-r unner.properties INFO: Project configuration file: NONE INFO: Default locale: "en_US", source code encoding: "UTF-8" INFO: Work directory: /home/sonar/sonar/sonar-runner-2.4/bin/./.sonar ERROR: Sonar server 'http://localhost:9000' can not be reached INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ Total time: 0.065s Final Memory: 5M/964M INFO: ------------------------------------------------------------------------ ERROR: Error during Sonar runner execution ERROR: java.net.ConnectException: Connection refused ERROR: Caused by: Connection refused ERROR: ERROR: To see the full stack trace of the errors, re-run SonarQube Runner with t he -e switch. ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.

最佳答案

日志显示sonnar-runner找不到在当前计算机上运行并监听端口9000的SonarQube实例:

ERROR: Sonar server 'http://localhost:9000' can not be reached

Sonnar-runner 需要 SonarQube 实例来运行分析。请参阅“两分钟入门”的前 4 个步骤 here

SonarQube 中的 C++ 支持是由商业插件提供的,因此您应该首先阅读 its documentation 。我认为还有一个社区插件。

对于 SonarQube 的安装,无论是哪个平台,请参阅 documentation以及上面的入门链接。

关于c++ - 我可以在哪里获得在 Linux 上对 C++ 代码运行 Sonar 库代码分析的步骤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32086933/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com