Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Format all files #804

wants to merge 4 commits into from

Conversation

PabloDinella
Copy link
Collaborator

No description provided.

Copy link
Member

@LarsKemmann LarsKemmann left a 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
Copy link
Member

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:

Suggested change
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

Copy link
Member

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
Copy link
Member

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.

Suggested change
max_line_length = 150
max_line_length = 100

{
var result = new CurrentFeatureFlags(
InviteUser: await featureManager.IsEnabledAsync(nameof(FeatureFlags.InviteUser)),
Copy link
Member

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.

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.

2 participants