Error: "This analysis will make your organization 'xxx' to reach the maximum allowed lines limit." thrown but still 440000 lines under our plan's limit

So i’m trying to analyze a small C# project (.NET Core), about 4k lines of code, perhaps 5k. The background task fails with the error from the title. Even though we just started with a 500k plan, of which we are currently only using 68k. What might be the problem?

Ok strangely, after changing to msbuild integration the error vanishes. Why would the stand-alone scanner throw an error like this is beyond me, but i’m out of the woods for now.

You are doing .NET development. The SonarScanner CLI does not know anything about .NET solutions, so it will pick every file located in your solution - which can represent a huge number of lines of code. On the other hand, the SonarScanner for MSBuild knows what a .NET solution is and what should not be considered as a source file: the analysis will end up with far fewer files and therefore lines of code in the end.

1 Like