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.
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