We recently added SonarLint to our default Eclipse install, but only use sonarlint on some new projects. While we have been quite happy with sonarlint on these projects, having automatic analysis defaulting to on for all of our legacy projects, slows down Eclipse start-up.
I could go through the 600+ projects and add a .settings/org.sonarlint.eclipse.core.prefs
file containing autoEnabled=false
, but I would rather have projects default to false
and add an autoEnabled=true
prefs file for just the projects where we have made an effort to adhere to sonarlint rules.
Is there any way to do this?
I looked at Disable Sonarlint automatic scan for Eclipse Remote Systems Explorer, but the top voted answer just suggests doing something I'm explicitly trying to avoid having to do, i.e setting prefs
on 600+ projects and the other answer doesn't seem to help either.
In Android Studio 3.5. 2: Go to File -> Settings -> Tools -> SonarLint -> Settings(Tab) then uncheck the Automatically trigger analysis check box.
Once you have disabled automatic analysis, you can simply delete all existing markers (in SonarLint Issues view, select the one you want to delete, right click -> delete).
Open the “SonarLint Bindings” view in Eclipse, right click on your connection, and click “Update all projects bindings”. I know the root cause. It is because these rules are default not activated. I shoud copy the built-in profile and activate them, then Update All Project Bindings from SonarLint.
@pippilongstocking The first things is to enable it for a project: you right click over a project (in the project view), Configure -> Enable SonarLint. Then, files should be automatically analyse when opening them or saving them.
From this discussion it seems that there's no way to disable automatic analysis globally by default. But there's a workaround: you can add sonar.exclusions properties for your files in the analyzer configuration (Window->Preferences->SonarLint->Analyzer Properties).
for example sonar.exclusions=**/*.js
excludes all *.js
files from automatic analysis
This worked for me:
Window->Preferences->SonarLint->File Exclusions Then New GLOB Pattern: "**/*"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With