How to set max line length default value to 120?

(Leonid Lee) #1

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…
(G Ann Campbell) #2

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

(Leonid Lee) #3

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.

(G Ann Campbell) #4

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

(Leonid Lee) #5

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

Regards, Leonid Lee.

1 Like