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

Code Quality: Enforced code style in EditorConfig #16441

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Lamparter
Copy link
Contributor

Resolved / Related Issues

Steps used to test these changes

N/A


More details are coming soon!

@Lamparter
Copy link
Contributor Author

@0x5bfa what do you think?

Copy link
Member

@0x5bfa 0x5bfa left a comment

Choose a reason for hiding this comment

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

I think some of them are default values and can be omitted but LGTM.

Looks good, once this merged we'd like to run "dotnet format -w PROJ_PATH" and create spell check exclude dictionary.

dotnet_naming_symbols.methods.applicable_accessibilities = *
dotnet_naming_symbols.methods.required_prefix =
dotnet_naming_symbols.methods.required_suffix = Async
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't this affect on all methods?

dotnet_naming_symbols.constants.required_prefix =
dotnet_naming_symbols.constants.required_suffix =
dotnet_naming_symbols.constants.required_capitalization = all_upper
Copy link
Member

Choose a reason for hiding this comment

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

I think Pascal is fine. Title case is used in C/C++

Copy link
Member

Choose a reason for hiding this comment

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

Wait, we require this. The normal C# convention is to use PascalCase for constants, we should amend.

dotnet_naming_rule.camel_case_for_parameters.style = camel_case
dotnet_naming_rule.pascal_case_for_properties.style = pascal_case
dotnet_naming_rule.upper_case_for_constants.style = all_upper
Copy link
Member

Choose a reason for hiding this comment

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

As above.

@0x5bfa 0x5bfa added changes requested Changes are needed for this pull request needs - code review labels Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes requested Changes are needed for this pull request needs - code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code Quality: Enforce code style in EditorConfig
2 participants