How to increase the limit of sonar.filesize.limit

Hi Sonar Support,

I’m having the issue with Sonar Analysis with the file that is greater than 20MB. I’ve found your release note here: SonarQube 9.8 released.

Could you please suggest me on how to increase that limit( “sonar.filesize.limit”) in my project settings? I would be appreciated if you provide me step-by-step guide.

Thank you in advance!

Hey there.

You can add sonar.filesize.limit as an analysis parameter (sonar-scanner -Dsonar.filesize.limit=25 or adding sonar.filesize.limit=25 to a file). The analysis parameter is documented here

What kind of code are you analyzing where you have files over 20 MB in size?

Hi Colin,

Thank you very much for your prompt reply! The code is in Node.js, its jar file is greater than 20MB

So we have 2 options, add this parameter in UI or in But we don’t have in working repo. However in UI I also couln’t figure it out where to add this analysis parameter. Could you please provide me step-by-step guide? In UI in Project settings I see only File and other exclusions in Analysis Scope. I’ve attached a screenshot

It is not possible to add this analysis parameter via the UI.

ok, so the only option is to define this parameter in file? Or what other option do we have to set anaysis parameter without UI?

Thank you in advace

The answer is the same as before!

And, I’m still interested in knowing this:

What is the maximum size you can set the sonar.filesize.limit ?

There’s no particular limit. Once you get out of the 2147483647 limit of Java integers, there’s probably another problem to address. :wink:

1 Like