SonarLint lives only in the IDE (IntelliJ, Eclipse and Visual Studio). Its purpose is to give instantaneous feedback as you type your code. For this, it concentrates on what code you are adding or updating.
SonarQube 是一个服务器,您可以在其中托管您的项目并执行分析,而 SonarLint是一个代理,允许我们连接到这个 SonarQube 并远程执行分析。SonarLint 可以与 IDE 一起使用,也可以通过 CLI 命令执行。
SonarLint contains its own set of default rules but when connected to SonarQube, users can import rules from SonarQube which are actually more than just standard set of rules. We can integrate PDM, CodeStyle and many other checker on SonarQube and create custom rules.
我想提到的两个事实是,我从自己的经验中学到的,SonarLint 不会继承 SonarQube 的那些自定义规则,其次,Sonar 不能在 Test 类上工作。
Sonarqube runs the rule valiations on the server We integrated it to our TFS builds. SonarLint runs in the IDE so before I commit my code I know what lines are violating which rules inside the IDE.