You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should enable both Microsoft.NetAnalyzers and StyleCop.Analyzers to align the code and keep it consistent.
Some files still contain tabs. We should get a warning and fix that. Some are even mixed mode (Options.cs)
Fields only set in the constructor should be marked readonly.
Properties only set in the constructor should only have a get, not a (private) set
Structures types should be marked readonly where possible.
Classes should be sealed if not meant to be extensible.
Use expression bodies for properties if single-lined.
...
We can enable rules as you see fit.
The text was updated successfully, but these errors were encountered:
@manfred-brands I'm in favor of adding the Microsoft.NetAnalyzers. Do you want to take a shot at setting it up with some set of rules to start with? All the stuff you mention is fine for me.
To a large extent, however, I don't like to have too many stylistic rules. To be clear, my experience, before I retired, was working with groups of highly competent developers who were able to read and code using a variety of styles without confusion. That may bias me and I'm happy to talk about it.
We should enable both Microsoft.NetAnalyzers and StyleCop.Analyzers to align the code and keep it consistent.
Some files still contain tabs. We should get a warning and fix that. Some are even mixed mode (Options.cs)
Fields only set in the constructor should be marked
readonly
.Properties only set in the constructor should only have a
get
, not a (private)set
Structures types should be marked
readonly
where possible.Classes should be
sealed
if not meant to be extensible.Use expression bodies for properties if single-lined.
...
We can enable rules as you see fit.
The text was updated successfully, but these errors were encountered: