How to set max line length default value to 120?

I have:

  • SonarServer CE 7.6 + CentOS 7 / Sonar-scanner 3.3.0 + Windows 2008 R2
    I want to:
  • Max line length default value = 120
    I tried:
  • I found Maximal (inclusive) length of lines parameter which default value equals 80 symbols.
  • I tried to setup Quality Gate. But there is no such option to pick.
  • I tried to google it…

Hi,

This is a question of the threshold set on the “lines too long” rule. You won’t be able to edit the threshold in the default profile, but in the custom profiles you create, you’ll have full control.

 
Ann

Hi Ann,

Thank you for quick response.
One more question:
I created new profile with overridden rule to warn on line contains more than 120 symbols.
So what should I do with issue that was spawned on line 80 symbols length.

Regards, Leonid Lee.

Hi Leonid,

Either make your profile the default profile, or assign your project explicitly to that profile and then reanalyze. The 80-char limit issues will go away.

 
Ann

Hi Ann,
Thank you so much. I reanalyzed project and issue gone.

Regards, Leonid Lee.

1 Like