dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.43k stars 986 forks source link

Add more analyzer coverage for coding style guidelines #10587

Open JeremyKuhne opened 10 months ago

JeremyKuhne commented 10 months ago

Not all of our coding style guidelines are covered by analyzers. https://github.com/dotnet/winforms/blob/main/docs/coding-style.md Some things that currently aren't covered:

JeremyKuhne commented 10 months ago

@sharwell here is the tracking issue from our off-line discussion

sharwell commented 10 months ago

XML comments indented by a space

Does not currently exist, but can be implemented based on SA1004 (Documentation lines should begin with a single space).

Line breaks start with operators: || at the beginning of the line for example ?: should be on a single line or broken starting two lines with ? and :

Related to https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/748.

=> stays on the previous line (for better alignment of further line breaks) t_ for thread statics unsafe on methods or classes only = can be aligned in some cases

I'm not aware of these already existing.

No empty XML comment blocks

Already implemented as SA1627 (Documentation text should not be empty).