I am using Free plan and the analysis is failing

Task failed with status FAILED, Error message: This analysis will make your organization ‘XXX-XXX-XXX’ to reach the maximum allowed lines limit (having 351917 lines).
Please contact the administrator of the organization to resolve this issue.

Getting the above error. Please let me know what’s the limit for LOC in Free plan and is there a way to exclude folders/files in a branch that I am analyzing?

Hey there.

The SonarQube Cloud Free Tier is limited to 50,000 private lines of code. There is no limit to the number of public LoC.

You can read about adjusting your analysis scope here.