Sonar.coverage.exclusions missing documentation and broken links says “You may disable coverage metrics for some source files by setting sonar.coverage.exclusions.” but that link leads to where sonar.coverage.exclusions is (no longer) documented.

In fact, I cannot find sonar.coverage.exclusions documented in any current documentation. It used to be documented, e.g. at

Hi Per,

It looks like the anchor for the link is off, but the Ignore Code Coverage section is down the page a little bit. You can set coverage exclusions from the UI at Administration > General Settings > Analysis Scope > Code Coverage. You can set this at the project or the global level.

Hope this helps,


The problem is that the there no longer is any documentation for sonar.coverage.exclusions, and the only mention of sonar.coverage.exclusions points at a page that does not document it, regardless of the anchor.

Unfortunately, your workaround does not help in our case. We need to set this in a configuration file located with our (version controlled) source code (a common requirement, I would assume), so setting this in the UI does not help us (and is no substitute for documenting sonar.coverage.exclusions).


Actually, it’s thoroughly documented in the UI.

In general we document the parameters that are not configurable in the UI. For the ones that are configurable in the UI and overridable in analysis parameters, the UI is the preferred method and you should find the explanations you need there.

Why is the UI the preferred method? Usually because for one reason or another the override is difficult to get right. What we’ve found - okay what I’ve found; I’m the one who removed them from the docs - is that listing such parameters in the docs seems to encourage people to set them in analysis parameters. And since that can be tricky to get right, it almost inevitably leads to problems and many rounds of needing help.

Thanks for understanding,

If the documentation for sonar.coverage.exclusions and other properties lives somewhere else than in the documentation site it would perhaps be good to mention this, with suitable links, at the relevant pages on

Regarding the choice of using the UI for settings like this, I strongly feel that settings about individual files belongs with those files, i.e. in the git repository for my source code, it does not belong in some settings for a UI of a service that may run on different servers for different developers. The color used for marking coverage is a setting suitable for the UI preferences, whereas the preferences to skip coverage for, or suppressing false positives, is a property of (a particular version of) the source code, and belongs there.

Personally I only minimally use the UI, e.g. for verifying that the coverage is still at 100%, but that is probably different between different users, and unrelated to the above.