4000 character SonarLint output limit

When our SonarLint rule executes, we want to output more than 4000 characters of text. However, SonarLint explicitly truncates the results to be at most 4000 characters.

QUESTION: To work around the issue, we are reviewing if we can change the SonarLint code that is doing the truncation to 4000 characters to instead support up to 16000 characters. We know what Java method to change. Our question is, which SonarQube editions will allow us to change and recompile the SonarLint rule execution source code so that we can increase the limit from 4000 characters to 16000 characters?

The code that does the 4000 character truncation is DefaultIssueLocation.message()

and so we would want to change that 4000 character limit to be 16000 characters.

Hi @sf_frank

I am a bit surprised by your use case. Issue message will be used for annotation description and tooltip in IntelliJ. Won’t a too-long message break the UI?

I’m not sure to understand your question. SonarLint codebase is mostly isolated from SonarQube. You can simply modify the SonarLint Core library to remove the truncation, then rebuild SonarLint IntelliJ to use your modified version of SonarLint Core. It will work independently of the SonarQube server your are connecting to (if that was your concern).