Exclude generated source?

Please provide

  • Operating system: Ubuntu 22.04.4
  • SonarLint plugin version:
  • Programming language you’re coding in: Various
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version):

And a thorough description of the problem / question:

Is there a way to configure the sonarlint plug-in to exclude generated source?

I’m getting a lot of red-herrings when I run analysis on an android project due to it complaining about issues in generated source.

I tried adding the build directory to the exclude list, but the files are still analyzed.



Hi David,

First, you skipped the Connected Mode question. If you’re in connected mode, your server settings will be applied in SonarLint too. So - assuming you set your exclusions via the UI - you’ll get the benefit of them in SonarLint.

SonarLint’s real purpose is to focus on the file you’re working on rather than to run full project analysis. That’s what SonarQube and SonarCloud are for.