Repository navigation
Copy .editorconfig from dotnet/corefx repo - #584
Conversation
|
Is there a way to have a list of nonconforming files and lines or it is required to open each .cs file? |
|
Investigating. So far I didn't find a way to scan the whole sln, however, ReSharper understands .editorconfig as well and is able to perform a full scan. |
|
I know you don't like ReSharper too much, are you currently working on something that should be pushed before? Otherwise, I would enforce the code style now. |
|
I'm working on adding unit tests that verify the recent changes in components based on code coverage. I don't plan to change anything other than test files. |
|
We do not need to follow their rules explicitly. Many of them sure, but for others like |
| dotnet_style_qualification_for_event = false:suggestion | ||
|
|
||
| # Use language keywords instead of framework type names for type references | ||
| # only use var when it's obvious what the variable type is |
There was a problem hiding this comment.
I disagree with this this section
|
|
||
| # Use language keywords instead of framework type names for type references | ||
| # only use var when it's obvious what the variable type is | ||
| csharp_style_var_for_built_in_types = false:none |
There was a problem hiding this comment.
should be true:suggestion
| # Use language keywords instead of framework type names for type references | ||
| # only use var when it's obvious what the variable type is | ||
| csharp_style_var_for_built_in_types = false:none | ||
| csharp_style_var_when_type_is_apparent = false:none |
There was a problem hiding this comment.
should be true:suggestion
| # only use var when it's obvious what the variable type is | ||
| csharp_style_var_for_built_in_types = false:none | ||
| csharp_style_var_when_type_is_apparent = false:none | ||
| csharp_style_var_elsewhere = false:suggestion |
There was a problem hiding this comment.
should be true:suggestion
|
|
||
| dotnet_naming_style.pascal_case_style.capitalization = pascal_case | ||
|
|
||
| # static fields should have s_ prefix |
There was a problem hiding this comment.
This rule is terrible...IMO.
There was a problem hiding this comment.
ReSharper suggests pascal case with no underscore, which I follow elsewhere. Up to debate. This is what this thread is for.
There was a problem hiding this comment.
Who prefers what for static fields?
There was a problem hiding this comment.
The s_-prefix requirement has been dropped. Static fields should be pascal cased.
| dotnet_naming_symbols.private_internal_fields.applicable_kinds = field | ||
| dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal | ||
|
|
||
| dotnet_naming_style.camel_case_underscore_style.required_prefix = _ |
There was a problem hiding this comment.
I also hate having an underscore prefix.
There was a problem hiding this comment.
This, on the other hand, is preferred by me.
There was a problem hiding this comment.
Also, this style is present throughout most of the repo, but I can change the config if everybody agrees.
There was a problem hiding this comment.
@akarnokd and me settled on keeping underscores as a compromise, for safety reasons, to make code more readably outside VS (github, git diff, etc) and since it's used throughout Rx sources today.
|
|
||
| # Code style defaults | ||
| dotnet_sort_system_directives_first = true | ||
| dotnet_style_require_accessibility_modifiers = always |
There was a problem hiding this comment.
I don't like this but can go either way. I prefer omit_if_default so that accessibility modifiers are only present if they differ from what the language provides.
There was a problem hiding this comment.
I'd rather have it explicit to be clear for anybody who contributes.
There was a problem hiding this comment.
Changed to omit_if_default to have less redundancies.
|
So, is there anything we definitely want to take from the corefx-config? We might as well settle with the original config or enhance that. |
….editorconfig, delete the overriding .editorconfig in Rx.NET.
|
@onovotny We have settled on some changes. Do you think we can go with the proposed .editorconfig? |
|
Looks good, the only suggestion I would add is to specify yaml/yml as indent size of 2. Otherwise, LGTM. |
|
@onovotny Can you access the build-logs? I can't, that has been happening occasionally for a while now. |
|
I don't see the logs either but am looking into it via other avenues. |

This repo should adhere to the coding guidlines defined in https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md. Assuming their .editorconfig exactly captures these guidelines, they have been copied here.