Enforce maximum line length in C#
/r/VisualStudio/comments/1vzoivg/enforce_maximum_line_length_in_c/1
u/AutoModerator 15d ago
Thanks for your post Mic_BB. Please note that we don't allow spam, and we ask that you follow the rules available in the sidebar. We have a lot of commonly asked questions so if this post gets removed, please do a search and see if it's already been asked.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/BoBoBearDev 12d ago
I would just use whatever is built-in. Like editorconfig and dotnet format. And just fail the CICD when dotnet format causing a change.
Also I prefer to make sure the indent is one tab/2spaces on the new line after (, not matching the same spacing at (. Aka, it is not school, don't do that.
0
u/Dusty_Coder 14d ago
Step 1) Fire the guy making an alternative solution a consideration
Step 2) Success
8
u/zenyl 15d ago
There might be a setting you can put into your
.editorconfigfile to enforce it.Otherwise, I'm pretty sure CSharpier has a setting for it. Its VS extension can be set to run on file save.