Disable Analysis of Existing Projects to Decrease the Number of Lines Counting Towards the License

Must-share information (formatted with Markdown):

  • SonarQube 10.1.0 Developer edition
  • Deployed using Docker via AWS CloudFormation to AW Elastic Container Service (ECS)
  • Decrease the number of lines that count towards the license (my plan for this right now is to disable analysis for all projects that we don’t need to analyze)
  • I configured several projects’s settings for “File Exclusions”, “Test File Exclusions” and “Code Coverage Exclusions” to contain * (i.e., all) for files and ** (i.e., all) for folders. However, doing this for 95 projects would be too time consuming and error-prone. Also, these changes don’t seem to have made any difference anyway.

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!


Disabling analysis won’t make any change in your license LOC because license LOC usage is based on the lines in SonarQube. To make this work, you would have to delete the projects from SonarQube.

Regarding exclusions, test files are never counted toward license LOC. Setting code coverage exclusions is just blinding you to the data about your projects. File exclusions would work, and there are certain files you should be excluding from analysis (e.g. libraries and generated files). But you probably shouldn’t exclude code that you own from analysis.

You can configure exclusions at the global level, Administration → General Settings → Analysis Scope. But no exclusions will kick in until you reanalyze the projects.


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.