-
-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce .NET framework naming rules #1267
Comments
The fact that they're official makes me inclined to just enforce, at least as a warning, maybe even as error. As far as I can tell from the links that you've provided, they're guidelines only because C# does not have a language feature to block on improper naming and this document was not available pre version 1. This allows older code to work always, but not necessarily make it a loose rule. |
That is correct, and it is about to change (with version 3 of the Roslyn compiler). Would you prefer a warning or an error? |
If it will error later, make it an error now. It will still compile but show up as error which is a nice intermediary |
Well, I'm not sure it will be an error, but it will be enforceable in the future. So still an error? |
Yeah. I think it makes sense. My argument is always: if it's official, there will be tooling. If there's tooling, there's official dependency on it following the guidelines. Therefore enforce via error. |
Sound reasoning. I'll do a PR. |
I've looked into it, and the editors (VS/VS Code/Rider) don't currently enforce the editorconfig settings. We can revisit this once the editorconfig support has been baked into the compiler. Progress for this feature can be checked here. |
I think that should help unblock this issue: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/overview#enable-on-build |
Yeah, that looks good. |
@ErikSchierboom |
That might be a good idea, yes. |
The official C# capitalization conventions define how things should be named in C#. Note that these are officially guidelines, but they are followed by virtually everyone. As such, they are the de facto standard and we should make any violation of the naming conventions an error. See:
The text was updated successfully, but these errors were encountered: