Skip to content

Add New Rules from Visual Studio 16.9#49

Merged
RehanSaeed merged 1 commit intomainfrom
add-vs-16-9-rules
Mar 6, 2021
Merged

Add New Rules from Visual Studio 16.9#49
RehanSaeed merged 1 commit intomainfrom
add-vs-16-9-rules

Conversation

@RehanSaeed
Copy link
Copy Markdown
Owner

@RehanSaeed RehanSaeed commented Mar 3, 2021

  • Fixed broken URL's links.
  • Removed some URL's to pages which no longer exist.
  • Re-ordered rules as they have been categorised differently on the .NET site.
  • Some undocumented rules are now documented, so moved them under the correct category.
  • The file header rule now has a category on the .NET site, so moved there.
  • Added new rules (See code for the docs and default I set):
dotnet_style_prefer_simplified_boolean_expressions
csharp_style_prefer_switch_expression
csharp_style_prefer_pattern_matching
csharp_style_prefer_not_pattern
csharp_style_implicit_object_creation_when_type_is_apparent
dotnet_remove_unnecessary_suppression_exclusions
dotnet_separate_import_directive_groups

@RehanSaeed RehanSaeed added enhancement Issues describing an enhancement or pull requests adding an enhancement. minor Pull requests requiring a minor version update according to semantic versioning. labels Mar 3, 2021
@RehanSaeed RehanSaeed requested a review from henrygab March 3, 2021 14:49
@RehanSaeed RehanSaeed merged commit 36eb562 into main Mar 6, 2021
@RehanSaeed RehanSaeed deleted the add-vs-16-9-rules branch March 6, 2021 09:20
Copy link
Copy Markdown
Collaborator

@henrygab henrygab left a comment

Choose a reason for hiding this comment

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

This was a LOT harder to review than it should have been. Too many types of changes in a single commit.

These are the only (non-comment) lines that were added, as best as I can tell:

dotnet_style_prefer_simplified_boolean_expressions = true:warning
csharp_style_prefer_switch_expression = true:warning
csharp_style_prefer_pattern_matching = true:warning
csharp_style_prefer_not_pattern = true:warning
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
dotnet_remove_unnecessary_suppression_exclusions = none:warning

Would have been better to have distinct commits for the three types of changes:

  1. Removal or update of dead links
  2. Moving (unchanged) lines
  3. Adding new settings

Reviewed so that others can more easily see the effective differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Issues describing an enhancement or pull requests adding an enhancement. minor Pull requests requiring a minor version update according to semantic versioning.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants