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

Open
wants to merge 5 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.

.editorconfig Outdated Show resolved Hide resolved
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, you mean use PascalCase here? I don't understand

image

The docs literally say use UPPER for constant variables.

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
@Lamparter Lamparter requested a review from 0x5bfa December 22, 2024 17:37
@Lamparter Lamparter marked this pull request as ready for review December 24, 2024 17:10
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