The “Line too long” rule in Sonar lint (S103 - SonarCloud) has a maximumLineLength
parameter which by default is set to 200 characters. This can be overridden by using a custom Sonarlint XML for each project.
If you have other formatters that read the .editorconfig
settings to get the max_line_width
for project line wrap settings, then Sonarlint will have to be updated separately for the S103 warnings (An example of such a formatter would be CSharpier - https://csharpier.com using the .editorconfig
configuration).
I propose having the maximumLineLength
first use custom Sonar XML overrides, and if there are no overrides for S103 it should use the .editroconfig
setting max_line_width
as a fallback before using the built-in default value.
This will reduce the number of places you need to update and sync to get a consistent line wrap config for your project.
These priorities should preferably also be used by SonarCloud during CI jobs.