0

我刚刚安装了 C/C++ 插件SonarSource的评估版。文档说:

  • 将 sonar.cpp.cppcheck.path 设置为 cppcheck 可执行文件 -> 完成
  • 在您的质量配置文件中激活一些 Cppcheck 规则 ->怎么做?

我找不到如何激活 cppcheck 规则。如果我浏览质量配置文件,我可以看到60 条规则。如果我尝试从 cppcheck 存储库中过滤规则,则不会出现。所以我该怎么做?

另外,我以前先运行 cppcheck 先验分析,然后使用 Sonar C++ Community 插件,其中包含 219 个 cppcheck 规则。我的第一个猜测是从 Community 配置文件继承 SonarSource 配置文件,但他们不共享配置文件类型:C/C++ vs c++。所以我无法做到这一点(因此不知道这是否是我正在寻求的解决方案)。

4

1 回答 1

1

This was a misunderstanding:

  • rules column in the Quality profiles page indicate the number of active rules, not the total number of available rules for the profile
  • the profile page filters by default active rules, which makes inactive rules hidden

The solution was to remove the filter on the Activation field, and then activate all rules as indicated in the documentation.

于 2013-07-31T10:35:04.880 回答