How can I disable the SonarLint automatic scan in Eclipse for the Remote Systems Explorer plugin?
Background:
I recently installed the SonarLint plugin for Eclipse, because a client I work for uses Sonar for code quality. And love the direct reporting of bugs and code smells.
Now I try to do some work for another client, which doesn't use Sonar, and has a old legacy project. Which I have connect to via SFTP so I use the Remote Systems Explorer for that. But when I open any file I can see notices all over the place.
To keep every clean and separated I have setup different workspaces for each client.
Things I tried:
There is the project settings there is a switch to disable the automatic scan, however those settings are not accessible for the Remote Systems Explorer.
Also that switch for automatic scan does not seem to be available in the global settings.
Next to that I tried the following globally SonarLint -> Analyzer Properties as stated in Exclude JS files from SonarLint:
sonar.exclusions=**/*.php
sonar.test.exclusions=**/*.php
That did not work, but that could be due to the fact that those settings are not possible in that location. At least that is what is stated in: https://groups.google.com/forum/#!msg/sonarlint/aBxnpn-yLbg/KL9nOiFQBAAJ
The SonarLint plugin also does not seem to show in the General -> Startup and Shutdown global settings, so I cannot disable it for a specific workspace.
Step 1 : Close all opened files in eclipse editor window.
Step 2 : Go To Project > Properties > SonarLint , then uncheck 'Run SonarLint Automatically' checkbox.
Step 3 : Restart Eclipse.
Ok I seem to have fixed my situation on my own...
As it turns out the exclusions parameters did work, however if SonarLint already has made it's analyses it caches the results somewhere. When opening an already scanned file it shows the results from the previous analyses. To remove that just select all in the Sonarlint window, right mouse click and choose the delete option.
Edit
One addition, it seems like if you close Eclipse with open files, and startup Eclipse again, the Sonarlint will automatic check those open files regardless of the exclusions.
来源:https://stackoverflow.com/questions/39795619/disable-sonarlint-automatic-scan-for-eclipse-remote-systems-explorer