-
Notifications
You must be signed in to change notification settings - Fork 6
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
Format all files #804
base: main
Are you sure you want to change the base?
Format all files #804
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are just a few formatting changes to make (in the .editorconfig) and one follow-up issue to create, otherwise this looks good. 😊
|
||
dotnet_naming_rule.private_member_variables.severity = error | ||
dotnet_naming_rule.private_member_variables.symbols = private_member_variables | ||
dotnet_naming_rule.private_member_variables.style = pascal_case_with_underscore_prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this to apply _camelCase
instead of _PascalCase
? I'm not 100% sure that this is the right syntax to do this but it's a starting point:
dotnet_naming_rule.private_member_variables.style = pascal_case_with_underscore_prefix | |
dotnet_naming_rule.private_member_variables.style = camel_case_with_underscore_prefix |
dotnet_naming_style.pascal_case_with_underscore_prefix.required_suffix = | ||
dotnet_naming_style.pascal_case_with_underscore_prefix.word_separator = | ||
dotnet_naming_style.pascal_case_with_underscore_prefix.capitalization = pascal_case | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I think you have to define a custom naming style here: camel_case_with_underscore_prefix
(basically the same as pascal_case_with_underscore_prefix
but with the capitalization changed)
indent_size = 4 | ||
end_of_line = crlf | ||
indent_style = space | ||
max_line_length = 150 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reduce the maximum line length? Let's say 100, which is much easier for side-by-side code reviews.
max_line_length = 150 | |
max_line_length = 100 |
{ | ||
var result = new CurrentFeatureFlags( | ||
InviteUser: await featureManager.IsEnabledAsync(nameof(FeatureFlags.InviteUser)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is one instance where the automatic naming changes are not great since we lose the clarity of which feature flag corresponds to which property, but arguably we could be returning these in a dictionary anyways. I'm fine with this change for now, but maybe when merging this PR we should create an issue to change CurrentFeatureFlags
to be a Dictionary<string, bool>
where the initializer uses nameof
to set the key? We could even generate this collection dynamically by iterating through all the values on FeatureFlags
.
No description provided.