which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
Sonar community edition (downloaded in zip file)
what are you trying to achieve
I am running sonar scanner on my project to measure comments percentage. But its excluding one file which has 27000 lines of code. I do not see any error in the logs. If I reduce the lines, its not excluding. Is there any limit on lines of code in a single file? Please help me with any solution. I want all files in the project to be included.
what have you tried so far to achieve this
Googled, but didn’t find proper solution.
TBH, we’re planning to do file size-based automatic exclusions on the SonarQube side ( SONAR-11096) but that ticket hasn’t been worked on yet, so I’m assuming this is happening on the language side… Which puts me out of my depth. Let’s wait till the language experts get here.
No need to wait, as it turns out. A colleague was able to point me to the relevant ticket, and it turns out that JavaScript and TypeScript analysis do automatically exclude large files. Details here:
There should be a property named sonar.javascript.maxFileSize, which determines the threshold for the file size, measured in kilobytes. Could you please try setting it to some value larger than the size of the excluded file (like e.g. 10000 or 100000), and then see whether it solves the problem?
Thanks for the suggestion. But unfortunately, I could not try it. Because, I am using local version of sonarqube which was dowloaded from here
I don’t see any file to edit this property sonar.javascript.maxFileSize. Do you have any suggestions on how to change this property when sonarqube is being ran locally?