How to deal with licence limit and duplicate lines of code


We are currently using the latest version of sonarqube, at the moment we have hit the limit for the licence we have.

I have some questions. The limit is 100k for example, on the pipeline that is failing the error message is saying that if the scan completed then the lines of code limit will be breached that is over 100k. Is there a way to know the total lines of code that will cause the breach, at the moment it is on about 85k.

Secondly, one of observations is that we currently have a lot of duplicate code, I would like sonarqube to show me examples of the duplicates such that it is much easier to show this to the developers to try and work out how we can drastically reduce the number of duplicate lines of code.

Currently, when I look at the measures section, Overall>>Duplicate lines, it shows the number of duplicate lines per file, duplicate blocks etc, clicking on it doesnt make sense to me. I was expecting to see the obvious duplicates.

We implemented this in SonarQube v9.1 (SONAR-13798), but it’s not available in earlier versions.

If you drill into a specific file and look for the grey bar (next to the lines indicating coverage), you can click and discover where the duplication is (what other files have the duplicated block)