云桌面插件地址 ftp://192.168.0.114/public/1开发工具/sonarlint-interllij-4.14.2.28348.zip
idea
File → Settings → plugins
选择从地址安装, 选择zip 文件, 安装后重启idea, 可在idea 左下角显示sonarLint 图标
在 File → Settings → Tools → sonarLint 中添加连接sonarLint 服务连接
192.168.0.175:9000
点击next 选择登录方式为Login/Password 填写用户名和密码登录
取消勾选自动分析
设置SonarLint项目:点击“SonarLint Project Settings”,勾选“Enable binding to remote SonarQube server”,并选择“Bind to server”,选择刚添加的sonarqube server。点击“OK”,关闭窗口即可。
使用SonarLint
分析当前文件
菜单栏代码质量分析
在这里插入图片描述
Analyze with SonarLint:分析当前选中的项目或文件
Analyze VCS Changed Files with SonarLint:只分析改动过的代码
Analyze All Files with SonarLint:分析所有的文件
只分析选中的项目/文件
项目/文件右键 -> SonarLint -> Analyze with SonarLint
在这里插入图片描述
文件内容右键 -> Analyze with SonarLint
在这里插入图片描述
在SonarLint窗口中有个Report tab页,里面显示所有分析的报告
可在 登录192.168.0.175:9000 查看报告