Unable to trigger SonarLint Analysis on whole Project

ⅰ亾dé卋堺 提交于 2019-12-01 14:18:28

问题


I have installed the latest sonarLint plugins with Intellij 2016.1.2. Analyze on the fly works fine. However, I can't find in the IntelliJ "Analyze" tab any "Analyze with SonarLint". In the SonarLint window>issues tab, I can only see scope "current file" or "opened files". I don't see any Project scope. So my question is how to trigger the analysis on my whole project ?


回答1:


Since SonarLint v2.8, it's possible to analyze all files in the project.

Open the SonarLint Tool Window, go to the Project files tab, and click in the "play" button. There is also an action to which you can assign a shortcut.

More information here: https://www.sonarlint.org/intellij/howto.html




回答2:


The easiest two ways to do project analyze:

  1. Choose Analyze | Analyze with SonarLint
  2. Press Ctrl + Shift + S



回答3:


they stated many times that their intent is to support only new issue being introduced running an on-fly analysis on files being changed. If you wanna run a full analysis you should use the SonarQubeCommunity plugin or visit your remote Sonar Server. If you wanna gather only coverage information within your IDE, use the Jacoco plugin. However there is an open feature request to browse those issues directly in the SonarLint plugin: https://jira.sonarsource.com/browse/SLE-54

Yes, that screenshot is confusing, but that feature was previously available.




回答4:


Since version 2.8 analysis of all files in the project is possible.




回答5:


As @Duarte - SonarSource Team suggests Sonar-Lint has a different purpose. It is intended to use to analyze for code changes in current file(s). i.e. it cannot perform analysis which needs to compare 2 files. (ex: finding duplicates, coverage etc.)

For your purpose that best way to achieve is running SonarQube with preview mode.



来源:https://stackoverflow.com/questions/37315276/unable-to-trigger-sonarlint-analysis-on-whole-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!