How to force line character length width in a .Net project

1.4k Views Asked by At

In the project I am working on, I am tasked with forcing line character width to 140 characters for a line of code in the visual studio editor. Unfortunately, to my research, any roslyn based analyzer does not support this feature. Can you please lead me a way to achieve this, it could be writing custom rules or what?

1

There are 1 best solutions below

0
Ben Wesson On

You could add the Editor Guidelines extension into Visual Studio:

https://marketplace.visualstudio.com/items?itemName=PaulHarrington.EditorGuidelines

I find it helpful to visually limit the length of lines of code, but it's not an automatic enforcement.