-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] run dotnet-format adopting all suggestions #17011
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
Closed
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7f1c4f9
[dotnet] run dotnet-format adopting all suggestions
titusfortner b03bfd8
Revert "[dotnet] run dotnet-format adopting all suggestions"
titusfortner c9b0389
fix IDE0065 violations
titusfortner 1ebb3c7
fix whitespace after style fixes
titusfortner 592d535
add explicit whitespace rules
titusfortner 62453bf
fix import ordering
titusfortner 2c8643c
enforce IDE1006
titusfortner 9bcd094
enforce IDE0059
titusfortner f235536
address IDE0044 issues
titusfortner 49901f5
addressing IDE0076
titusfortner f9cdf7f
make this a suggestion since it can't be auto-formatted
titusfortner 86aa0e0
Fix IDE1005
titusfortner 4802b05
Add TODO for future work
titusfortner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,85 @@ | ||
| [*.cs] | ||
| csharp_style_namespace_declarations=file_scoped:suggestion | ||
| # See all defaults set in selenium/.editorconfig | ||
|
|
||
| # dotnet format whitespace | ||
|
|
||
| # New lines and braces (Allman-style) | ||
| csharp_new_line_before_open_brace = all | ||
| csharp_new_line_before_else = true | ||
| csharp_new_line_before_catch = true | ||
| csharp_new_line_before_finally = true | ||
| dotnet_style_operator_placement_when_wrapping = end_of_line | ||
|
|
||
| # Preserve compact formatting where used | ||
| csharp_preserve_single_line_statements = true | ||
| csharp_preserve_single_line_blocks = true | ||
|
|
||
| # Indentation | ||
| csharp_indent_block_contents = true | ||
| csharp_indent_braces = false | ||
| csharp_indent_case_contents = true | ||
| csharp_indent_case_contents_when_block = true | ||
| csharp_indent_switch_labels = true | ||
| csharp_indent_labels = one_less_than_current | ||
|
|
||
| # Spacing | ||
| csharp_space_after_cast = false | ||
| csharp_space_after_comma = true | ||
| csharp_space_after_dot = false | ||
| csharp_space_after_semicolon_in_for_statement = true | ||
| csharp_space_around_binary_operators = before_and_after | ||
| csharp_space_before_colon_in_inheritance_clause = true | ||
| csharp_space_after_colon_in_inheritance_clause = true | ||
| csharp_space_between_method_call_name_and_opening_parenthesis = false | ||
| csharp_space_between_method_call_parameter_list_parentheses = false | ||
| csharp_space_between_method_declaration_name_and_open_parenthesis = false | ||
| csharp_space_between_method_declaration_parameter_list_parentheses = false | ||
| csharp_space_after_keywords_in_control_flow_statements = true | ||
|
|
||
| # dotnet format style | ||
|
|
||
| # Namespace | ||
| csharp_style_namespace_declarations=file_scoped:warning | ||
|
|
||
| # Using directives | ||
| dotnet_sort_system_directives_first = true | ||
| dotnet_separate_import_directive_groups = false | ||
| csharp_using_directive_placement = outside_namespace:warning | ||
|
|
||
| # Roslyn | ||
| dotnet_diagnostic.IDE1006.severity = suggestion # Naming rule violation | ||
| dotnet_diagnostic.IDE0059.severity = warning # Unnecessary assignment | ||
| dotnet_diagnostic.IDE0044.severity = warning # Make field readonly | ||
| dotnet_diagnostic.IDE0076.severity = warning # Invalid suppression | ||
| dotnet_diagnostic.IDE1005.severity = warning # Delegate invocation | ||
|
|
||
| # TODO: Additional violations to investigate | ||
| # The following are the number of violations for each diagnostic; | ||
| # They currently fail at info, the goal is to fix and explicitly set to warning above | ||
| # Investigate with `dotnet format style --diagnostics IDEXXXX --severity info` | ||
| # 1183 IDE0090 | ||
| # 633 IDE0028 | ||
| # 252 IDE0290 | ||
| # 169 IDE0077 | ||
| # 66 IDE0130 | ||
| # 65 IDE0300 | ||
| # 57 IDE1005 | ||
| # 42 IDE0017 | ||
| # 39 IDE0039 | ||
| # 36 IDE0063 | ||
| # 33 IDE0306 | ||
| # 31 IDE0083 | ||
| # 30 IDE0016 | ||
| # 26 IDE0305 | ||
| # 18 IDE0031 | ||
| # 12 IDE0270 | ||
| # 11 IDE0057 | ||
| # 11 IDE0054 | ||
| # 9 IDE0350 | ||
| # 9 IDE0074 | ||
| # 7 IDE0060 | ||
| # 3 IDE0150 | ||
| # 2 IDE0038 | ||
| # 1 IDE0056 | ||
| # 1 IDE0034 | ||
| # 1 IDE0018 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Likely as a follow-up given the mechanical and titanic nature of this PR:
This is the only useful attribute in this file; the various old-school global suppressions should be addressed or folded into the editorconfig.