my sonarcloud
The current plan is (100k private lines of code for €10 per month), my repo code is very below that, but here showing (your number of lines exceeds your organization plan), I still have LOC End of trial version in 12 days(Next charge will be on July 31, 2021)
Could you please give us the logs produced by the sonarsource/sonarcloud-scan pipe, in DEBUG mode?
You say your project has much less than 100k lines of code. I suppose you don’t have any other private project on the same organization that could use the remaining LOCs.
Are you sure the analysis scope is correctly configured to only consider your project code, and for example to exclude all the libraries, binaries, and compilation output? If such big files are considered as code by the Sonar Scanner (for example if they are in a non-standard library directory), it can explain why the threshold is reached.
i scaned only : sonar.sources.xxx. (my source folder only)
I tried, except my source folder, others all are excluded, but still, its shows the same error, I don’t know why? please can you help to exclude everything except the source directory,
The error we are seeing is:
✖ Quality Gate failed: Could not fetch quality gate status: b'{"errors":[{"msg":"Analysis with id \\u0027None\\u0027 is not found"}]}'
and
Your analysis with ID “AXs6Dl8d4FOtEiGI8Ual” has failed: your number of lines exceeds your organization plan. Edit billing info or See details in Background Tasks Or see troubleshooting documentation
here, when we deleting our source folder it’s working, otherwise, it’s getting failed, our repo code line is not greater than 100k then why its show this error Quality Gate failed, I’m facing this for more than 15 days
please respond as soon as possible.
here I added some screenshots to easily understand my issue.
In your bitbucket-pipelines.yml file I don’t see any configuration about the source folder. What have you tried? How did you exclude other files than the source folder?
here I tried, except my source folder, others all are excluded, but still, its shows the same error, I don’t know why? please can you help to where exclude everything except the source directory,
If your source code is in the app directory, then this is a good start:
sonar.sources = app
It’s important to understand that SonarCloud will try to analyze all the files for which we have some analyzer, even some files which you may not consider as code. That’s why, it’s important to explicitly exclude file paths which you don’t want to analyze. I see you already have this:
sonar.exclusions = node_modules/**/*,foo
That’s good. You may need to add more to that list. The right settings really depend on your project.
You probably want to review the files that are included in the analysis, and verify if you really want to analyze all of them, or if you notice something that should be excluded. You can do this by activating debug log, run the scanner again, and review the output. The correct syntax is this (without the -D in your file):
sonar.verbose = true
See also our main documentation for all the possible configuration options to include or exclude files.
In the output of the scanner in debug mode, review the lines that contain the text “indexed with language”. These lines include the file paths that are indexed, and most of them are probably analyzed too, for example:
20:23:39.627 DEBUG: 'src/foo.js' indexed with language 'js'
20:23:39.627 DEBUG: 'src/foo.py' indexed with language 'py'
Count the lines in the mentioned files, and compute the total sum. Without a doubt, you will find the total lines push you over your limit. Most probably because there are some files which you don’t really want to analyze, you want to exclude them. This is not an exact calculation, but hopefully close enough to help you find more files that should be excluded.