Sonarlint eclipse 如何检查SonarLint插件是否正在Eclipse中分析我的代码? 我在Eclipse中安装了SangARLIt插件,现在我正在尝试在我的玩具C++项目上测试它。我看不到关于我的代码的错误/警告/警报,即使我故意使它真正崩溃。有没有办法检查或确认Sonarint确实试图验证我的源代码

Sonarlint eclipse 如何检查SonarLint插件是否正在Eclipse中分析我的代码? 我在Eclipse中安装了SangARLIt插件,现在我正在尝试在我的玩具C++项目上测试它。我看不到关于我的代码的错误/警告/警报,即使我故意使它真正崩溃。有没有办法检查或确认Sonarint确实试图验证我的源代码,sonarlint-eclipse,Sonarlint Eclipse,这是我的测试程序源: struct C { 布尔x; 布尔伊; }; int f(C) { int*p=nullptr; *p=3; 如果(c.x) 如果(c.x) 返回true; 如果(c.x) 返回false; 返回*p; } int main() { C C; int i=f(c); } 我确信我已经安装了SonarLint插件,因为无论何时启动Eclipse,我都会收到一条错误消息“SonarLint-Rules not available”:“在满足某些需求之前,某些规则是不可用的”

这是我的测试程序源:

struct C
{
布尔x;
布尔伊;
};
int f(C)
{
int*p=nullptr;
*p=3;
如果(c.x)
如果(c.x)
返回true;
如果(c.x)
返回false;
返回*p;
}
int main()
{
C C;
int i=f(c);
}
我确信我已经安装了SonarLint插件,因为无论何时启动Eclipse,我都会收到一条错误消息“SonarLint-Rules not available”:“在满足某些需求之前,某些规则是不可用的”。当我点击“详细信息”时,我得到“一些分析仪无法加载”

控制台输出如下所示:

Starting SonarLint for Eclipse 5.6.0.25634
Trigger: STARTUP
Clear markers on 0 excluded files
SonarLint processing file /AK GCC Test/main.cpp...
Wrote build info to: /home/andrzej/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/AK GCC Test/org.sonarlint.eclipse.core/sonarlint18042127755659198027/build-wrapper-dump.json
Standalone mode (project not bound)
Starting analysis with configuration:
[
  baseDir: /home/andrzej/workspace/AK GCC Test
  extraProperties: {sonar.cfamily.useCache=false, sonar.cfamily.build-wrapper-output=/home/andrzej/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/AK GCC Test/org.sonarlint.eclipse.core/sonarlint18042127755659198027}
  excludedRules: []
  includedRules: []
  ruleParameters: {}
  inputFiles: [
    file:/home/andrzej/workspace/AK%20GCC%20Test/main.cpp (UTF-8) [cpp]
  ]
]

Starting standalone SonarLint engine 5.6.0.25634...
Loading embedded analyzers...
  - /plugins/sonar-html-plugin-3.3.0.2534.jar
  - /plugins/sonar-javascript-plugin-7.0.1.14561.jar
  - /plugins/sonar-python-plugin-3.1.0.7619.jar
  - /plugins/sonar-java-plugin-6.10.0.24201.jar
  - /plugins/sonar-php-plugin-3.13.0.6849.jar
Create : /home/andrzej/.sonarlint/plugins
Plugin cache: /home/andrzej/.sonarlint/plugins
Create : /home/andrzej/.sonarlint/plugins/_tmp
Load plugins
Plugin 'JavaScript/TypeScript Code Quality and Security' requires Node.js 8.0.0. Skip loading it.
Plugin 'Java Code Quality and Security' is excluded because language 'Java' is not enabled. Skip loading it.
Load plugins (done) | time=15ms
Plugins:
  * Python Code Quality and Security 3.1.0.7619 (python)
  * HTML Code Quality and Security 3.3.0.2534 (web)
  * PHP Code Quality and Security 3.13.0.6849 (php)
Start analysis
Index files
Language of file 'file:/home/andrzej/workspace/AK%20GCC%20Test/main.cpp' is set to 'C++'
1 file indexed
'PHP sensor' skipped because there is no related file in current project
'Analyzer for "php.ini" files' skipped because there is no related file in current project
'Python Sensor' skipped because there is no related file in current project
Execute Sensor: HTML
Found 0 issue(s)
0 entries removed from the store
Done in 1384 ms

基于[这个错误报告] [1 ],我认为这不应该影响SalARLIt分析C++代码的能力。

但是,当我更改代码并编译上述代码时,SonarLint不会发出任何警告。当我右键单击我的项目名称时,我在上下文菜单中得到“SonarLint”项;当我展开它时,我有一个“分析”项;当我选择它时,“SonarLint报告”窗口打开,但它不包含任何消息。肯定至少应该为我的上述代码找到一个bug

有没有办法验证什么是错误的?或者如果我的期望不正确



  [1]: https://community.sonarsource.com/t/sonarlint-eclipse-warning-at-startup/29150

好的,我知道。SONARLILT不支持C++。它是C++中使用的其他SONARSOURCE工具。