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

Add more style configuration #854

Merged
merged 1 commit into from
Sep 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,16 @@ csharp_space_between_method_call_name_and_opening_parenthesis = true
csharp_space_before_open_square_brackets = true
csharp_new_line_before_open_brace = methods
csharp_new_line_before_else = false
csharp_indent_switch_labels = false
csharp_indent_switch_labels = false

trim_trailing_whitespace = false
Copy link
Owner

Choose a reason for hiding this comment

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

That should be true no? We don't want trailing whitespaces.

Copy link
Contributor

Choose a reason for hiding this comment

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

@jbevain i assume @Zastai was trying to define a config that most closely matches the current codebase. given there are existing trailing whitespaces, the assumption is trim_trailing_whitespace = false

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly. I got a spurious diff for a PR because Rider had trimmed existing trailing white space.

If the intent is not to have trailing whitespace and it's ok for a PR to include such a change, then by all means set it to true.

Copy link
Owner

Choose a reason for hiding this comment

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

Ah got it, makes sense. Thanks. Yeah let's land this one like this, I'll definitely take a follow-up PR that trims trailing whitespaces.


dotnet_naming_symbols.fields_locals_and_parameters.applicable_kinds = field, local, parameter
dotnet_naming_symbols.fields_locals_and_parameters.applicable_accessibilities = *

dotnet_naming_style.snake_case.capitalization = all_lower
dotnet_naming_style.snake_case.word_separator = _

dotnet_naming_rule.fields_locals_and_parameters_use_snake_case.symbols = fields_locals_and_parameters
dotnet_naming_rule.fields_locals_and_parameters_use_snake_case.style = snake_case
dotnet_naming_rule.fields_locals_and_parameters_use_snake_case.severity = suggestion