Skip to content

Conversation

@sharwell
Copy link
Contributor

No description provided.

@sharwell sharwell requested a review from a team as a code owner July 27, 2018 15:11
@333fred
Copy link
Member

333fred commented Jul 27, 2018

How many warnings are you getting in the IDE with these settings?

@sharwell
Copy link
Contributor Author

sharwell commented Jul 27, 2018

How many warnings are you getting in the IDE with these settings?

None, for two reasons:

  1. The severity is suggestion

  2. Due to Remove IBuiltInAnalyzer.OpenFileOnly #26758, naming violations are never reported in files that are not open, regardless of severity

    public override bool OpenFileOnly(Workspace workspace) => true;

These settings appear at least close to the ones used for the majority of new code.

Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming changes appear to be consistent with my understanding of the compiler conventions.

# Project-specific settings:
[*.{cs,vb}]
# Local functions are camelCase
dotnet_naming_style.local_function_style.capitalization = camel_case
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might deserve a comment in the parent .editorconfig. If somebody "helpfully" renames the local_function_style to something else, this override might silently disappear. Hopefully that creates warnings, but...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternately, this is a new feature, can't we just agree on this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we just agree on this one?

I'll submit a follow-up issue to try and agree on it, but my understanding is the current form matches the currently-used preferences.

@sharwell sharwell merged commit cd6a9f0 into dotnet:master Aug 2, 2018
@sharwell sharwell deleted the editorconfig-naming branch August 2, 2018 02:02
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style

dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure it must be protected_internal rather than protected internal

dotnet_naming_rule.instance_fields_should_be_camel_case.symbols = instance_fields
dotnet_naming_rule.instance_fields_should_be_camel_case.style = instance_field_style

dotnet_naming_symbols.instance_fields.applicable_kinds = field
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be nice to explicitly put the accessibility as "*"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants