LOC is calculated by summing up the LOC of each project analyzed in your SonarQube instance. Blank lines, comments, and lines of test code are never included in the count. The LOC of a project is counted as the lines in the largest branch of the project. If you have set up branch analysis for your project, the LOC used for a project are the ones found during the most recent analysis of the project with the largest branch or pull request. More details can be found on the Lines of Code page in our docs.