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
Something which has come up in PRs a few times recently is that the framework has a more lax editorconfig ruleset than the analyzers project (and potentially others??). It specifically came up in the bracing style for a multi-line loop, but at a glance there's several other styling differences in the editorconfigs. For example:
foreach(var x in items)if(x.BoolTest)
x.DoSomething();
The analyzers project has a rule to suggest explicit use of braces in the foreach but not the if statement. The framework's editorconfig doesn't have this rule, and it has resulted in some PR feedback on recent framrwork PRs. We should consider updating the framework editorconfig so that the tooling can better guides contributors on any preferred style guidelines.
The text was updated successfully, but these errors were encountered:
The main thing Is to get it part of the checking whilst editing, then things will stay consistent. Configuring the rules is relatively easy once agreed upon.
It is possible to align this between repositories if that is something the core team wants. But not necessary if the editor helps you, it is not to bad switching.
At my work we install a single NuGet package to get consistent rules between a large set of repositories.
Bear in mind that the Core Team doesn't have the role of "enforcing" particular standards or processes on member projects. That means it takes negotiation across projects rather than a decision by the Core Team. This is a feature of our governance policy, rather than a bug. :-)
That's not an obstacle to what you are trying to do here - it's just that you have to do it project by project and this is the right place to propose it for the framework project.
Thanks @CharliePoole
That had indeed been my thinking here: to start a chat about adopting any further style conventions for the framework project, and to configure tooling such as editorconfig so that they can be applied automatically ("enforced" was perhaps a strong word to have initially used for this).
I'm going to close this. It hasn't seen much interest in discussion here, though editorconfig changes have been getting organically added in PRs as conversations come up.
Something which has come up in PRs a few times recently is that the framework has a more lax editorconfig ruleset than the analyzers project (and potentially others??). It specifically came up in the bracing style for a multi-line loop, but at a glance there's several other styling differences in the editorconfigs. For example:
The analyzers project has a rule to suggest explicit use of braces in the foreach but not the if statement. The framework's editorconfig doesn't have this rule, and it has resulted in some PR feedback on recent framrwork PRs. We should consider updating the framework editorconfig so that the tooling can better guides contributors on any preferred style guidelines.
The text was updated successfully, but these errors were encountered: