Test File Exclusions not working


We have the Sonarqube Community Edition 8.9.8. We are trying to exclude some test files using the web interface, but it is not working at all.

The test files are located in folders called test in different directories. I have tested with the following patterns, which I think are correct:

  • */tests/
  • **/tests/*.py

I have read other threads but I don’t find any solution. I think that the issue may be similar to the last comment here (File exclusion added, but still analyzed? - #2 by janos), but it doesn’t have a final solution.

I know that the files are still included because I can see Security Hotspots detected in this files, and it appears as “lines of code” in the tab Code.

What else could I try?

Thank you


Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

8.9.8 → 9.9.2 → 10.2.1 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

Hi Colin,

Thanks for your answer. We have the upgrade in our roadmap, but I don’t know the date. Is not any possible solution in the meantime?

Thank you.