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

Update code analysis props for .NET 6 #26880

Merged
merged 5 commits into from
Nov 16, 2021
Merged

Update code analysis props for .NET 6 #26880

merged 5 commits into from
Nov 16, 2021

Conversation

gewarren
Copy link
Contributor

@gewarren gewarren commented Nov 9, 2021

@gewarren gewarren added the 🏁 Release: .NET 6 Issues and PRs for the .NET 6 release label Nov 9, 2021
@gewarren gewarren requested a review from adegeo as a code owner November 9, 2021 04:23
@@ -665,7 +665,7 @@ The `CodeAnalysisTreatWarningsAsErrors` property lets you configure whether code
### EnforceCodeStyleInBuild

> [!NOTE]
> This feature is currently experimental and may change between the .NET 5 and .NET 6 releases.
> This feature is currently experimental.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mavasani Is it still considered experimental?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

with this issue resolved: dotnet/roslyn#49044 I am not aware of any issues. folks who subsume preview SDKs may get errors due to the codestyle version they use being newer then what is included in Visual Studio but I believe we are fine with this experience. for RTM sdks and Visual Studios this feature should be fully useable

Copy link
Contributor

Choose a reason for hiding this comment

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

We should also remove experimental from Code Analysis property page:

image

@gewarren gewarren requested review from mavasani and a team November 9, 2021 04:31
@BillWagner
Copy link
Member

closing and reopening to check required actions.

@BillWagner
Copy link
Member

closing to pick up action name change.

@BillWagner BillWagner closed this Nov 12, 2021
@BillWagner BillWagner reopened this Nov 12, 2021
@gewarren
Copy link
Contributor Author

@adegeo Could you review this one?

Copy link
Contributor

@adegeo adegeo left a comment

Choose a reason for hiding this comment

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

LGTM! Some minor things to look at.

@@ -49,7 +49,7 @@ These specific rules aren't enabled by default. To enable them and show any viol

```xml
<PropertyGroup>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
<AnalysisMode>All</AnalysisMode>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this accurate? The file name indicates .NET 5+ but the value used here is .NET 6.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I assume that most people using .NET 5 will upgrade to .NET 6 since it's LTS. I could add a note block to use a different value for .NET 5 if you think it's necessary.

Comment on lines +62 to +78
:::row:::
:::column:::
`None`
:::column-end:::
:::column:::
`Default`
:::column-end:::
:::column:::
`Minimum`
:::column-end:::
:::column:::
`Recommended`
:::column-end:::
:::column:::
`All`
:::column-end:::
:::row-end:::
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: If there is no description provided for each of these, why wouldn't they just be a list?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They could be a list - it just takes up less space to have them in columns rather than rows.

Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com>
@gewarren gewarren merged commit 241be5d into dotnet:main Nov 16, 2021
@gewarren gewarren deleted the ca-.net6 branch November 16, 2021 01:29
IEvangelist added a commit that referenced this pull request Nov 17, 2021
* Update cs5001.md (#27080)

* Update cs5001.md

* Update docs/csharp/misc/cs5001.md

Co-authored-by: David Pine <david.pine@microsoft.com>

* Remove redundant nullable operator (#27023)

* Remove redundant nullable operator

Remove redundant nullable operator for reference type. String is a reference type and always nullable,

* Make undesired error more clear

Co-authored-by: Bill Wagner <wiwagn@microsoft.com>

Co-authored-by: Bill Wagner <wiwagn@microsoft.com>

* VS 2022 'preview' removed (#27070)

* Fixed Typo (#27072)

changed short description to shortDescription in the comments to avoid confusion.

* Update package index with latest published versions (#27083)

* Update ExampleAsyncDisposable.cs (#27074)

* Details overloading `==` and `!=` operators on the `ValueObject` type (#27040)

* Add details about overloading == and != operators

* Apply suggestions from code review

Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>

Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>

* Fix text element count not starting at 1 (#27010)

When the code sample `InsertNewlinesEveryTenTextElements` is run, the first newline is 11 characters long when it is meant to be 10. This commit fixes that by making the `textElementCount` start at 1.

* Update code analysis props for .NET 6 (#26880)

* Update package index with latest published versions (#27095)

* Add link to Fedora .NET 6 tracking bug (#27091)

* Update linux-fedora.md

* Update linux-fedora.md

* Retitle Fact 1 (#27102)

Facts cannot be stated in an imperative form. Otherwise, I would call it a "tip".

* Add the HTTP keyword to the expected list of available slug completions (#27104)

* Address concerns about inconsistent code style and formatting (#27089)

* Code style

* Update usings.cs

* Code block fix (#27103)

* Update package index with latest published versions (#27105)

* Fix NETSDK error number (#27106)

* Add more info to recommended actions (#27093)

* Add note about .NET Framework (#27107)

* Update package index with latest published versions (#27108)

* fix build suggestions (#27109)

* Add note about FTP (#27094)

* Add with-expressions to anonymous types (#27111)

* Add with-expressions to anonymous types

Fixes #26770

With-expressions can be used with anonymous types.

* code review

* Bump Humanizer (#27124)

Bumps [Humanizer](https://github.com/Humanizr/Humanizer) from 2.11.10 to 2.13.14.
- [Release notes](https://github.com/Humanizr/Humanizer/releases)
- [Changelog](https://github.com/Humanizr/Humanizer/blob/main/release_notes.md)
- [Commits](Humanizr/Humanizer@v2.11.10...v2.13.14)

---
updated-dependencies:
- dependency-name: Humanizer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix Dispose(bool) method overload in ConjunctiveDisposable pattern (#27118)

* Update ExampleAsyncDisposable.cs

* Update ExampleConjunctiveDisposable.cs

* Add documentation for CA2255 (new in .NET 6) (#27096)

* Add documentation for CA2255 (new in .NET 6)

* Address pr feedback

* Remove backticks from page metadata (#27114)

* Update package index with latest published versions (#27115)

* acrolinx (#27117)

* update front matter for .net 6

Co-authored-by: Machiel visser <16868513+machielvisser@users.noreply.github.com>
Co-authored-by: David Pine <david.pine@microsoft.com>
Co-authored-by: Artur Khutak <rd.artyrchik@gmail.com>
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Co-authored-by: Jakub Kozera <kozerakuba@gmail.com>
Co-authored-by: Azhar <17266828+mohamed-azhar@users.noreply.github.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: wuyuansushen <43259764+wuyuansushen@users.noreply.github.com>
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
Co-authored-by: Leo Spratt <enchant97@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com>
Co-authored-by: Radosław Rowicki <35342116+radrow@users.noreply.github.com>
Co-authored-by: Ken Dale <ken@kendaleiv.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
IEvangelist added a commit that referenced this pull request Dec 14, 2021
* Blazor ebook frontmatter (#27086)

* Update cs5001.md (#27080)

* Update cs5001.md

* Update docs/csharp/misc/cs5001.md

Co-authored-by: David Pine <david.pine@microsoft.com>

* Remove redundant nullable operator (#27023)

* Remove redundant nullable operator

Remove redundant nullable operator for reference type. String is a reference type and always nullable,

* Make undesired error more clear

Co-authored-by: Bill Wagner <wiwagn@microsoft.com>

Co-authored-by: Bill Wagner <wiwagn@microsoft.com>

* update version

* fix typo

Co-authored-by: Machiel visser <16868513+machielvisser@users.noreply.github.com>
Co-authored-by: David Pine <david.pine@microsoft.com>
Co-authored-by: Artur Khutak <rd.artyrchik@gmail.com>
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>

* VS 2022 'preview' removed (#27070)

* Fixed Typo (#27072)

changed short description to shortDescription in the comments to avoid confusion.

* Update package index with latest published versions (#27083)

* Update ExampleAsyncDisposable.cs (#27074)

* Details overloading `==` and `!=` operators on the `ValueObject` type (#27040)

* Add details about overloading == and != operators

* Apply suggestions from code review

Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>

Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>

* Fix text element count not starting at 1 (#27010)

When the code sample `InsertNewlinesEveryTenTextElements` is run, the first newline is 11 characters long when it is meant to be 10. This commit fixes that by making the `textElementCount` start at 1.

* Update code analysis props for .NET 6 (#26880)

* Update package index with latest published versions (#27095)

* Add link to Fedora .NET 6 tracking bug (#27091)

* Update linux-fedora.md

* Update linux-fedora.md

* Retitle Fact 1 (#27102)

Facts cannot be stated in an imperative form. Otherwise, I would call it a "tip".

* Add the HTTP keyword to the expected list of available slug completions (#27104)

* Address concerns about inconsistent code style and formatting (#27089)

* Code style

* Update usings.cs

* Code block fix (#27103)

* Update package index with latest published versions (#27105)

* Fix NETSDK error number (#27106)

* Add more info to recommended actions (#27093)

* Add note about .NET Framework (#27107)

* Update package index with latest published versions (#27108)

* fix build suggestions (#27109)

* Add note about FTP (#27094)

* Add with-expressions to anonymous types (#27111)

* Add with-expressions to anonymous types

Fixes #26770

With-expressions can be used with anonymous types.

* code review

* Bump Humanizer (#27124)

Bumps [Humanizer](https://github.com/Humanizr/Humanizer) from 2.11.10 to 2.13.14.
- [Release notes](https://github.com/Humanizr/Humanizer/releases)
- [Changelog](https://github.com/Humanizr/Humanizer/blob/main/release_notes.md)
- [Commits](Humanizr/Humanizer@v2.11.10...v2.13.14)

---
updated-dependencies:
- dependency-name: Humanizer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix Dispose(bool) method overload in ConjunctiveDisposable pattern (#27118)

* Update ExampleAsyncDisposable.cs

* Update ExampleConjunctiveDisposable.cs

* Add documentation for CA2255 (new in .NET 6) (#27096)

* Add documentation for CA2255 (new in .NET 6)

* Address pr feedback

* Remove backticks from page metadata (#27114)

* Update package index with latest published versions (#27115)

* acrolinx (#27117)

* Restore the Azure for .NET devs tile (#27128)

* Update rabbitmq-event-bus-development-test-environment.md (#27134)

Fixes #27130

* Fix typo (#27141)

* Acrolinx 11/17 (#27131)

* acrolinx

* fix link

* Blazor Hot Reload (#27166)

* Blazor Hot Reload section

* fixing hot to Hot

* Apply suggestions from code review

Co-authored-by: David Pine <david.pine@microsoft.com>

Co-authored-by: David Pine <david.pine@microsoft.com>

* update vs images (#27375)

* Update to .NET 6 / VS 2022

* Update to .NET 6 / VS 2022 (#27379)

* Update startup details

* update with new features

* updating startup references

* update ms.date and another startup reference

* Update ms.date

* update references to startup files and older versions of .NET

* Apply suggestions from code review

Co-authored-by: David Pine <david.pine@microsoft.com>

* Update docs/architecture/blazor-for-web-forms-developers/project-structure.md

Co-authored-by: David Pine <david.pine@microsoft.com>

* fixing links

Co-authored-by: Machiel visser <16868513+machielvisser@users.noreply.github.com>
Co-authored-by: David Pine <david.pine@microsoft.com>
Co-authored-by: Artur Khutak <rd.artyrchik@gmail.com>
Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
Co-authored-by: Jakub Kozera <kozerakuba@gmail.com>
Co-authored-by: Azhar <17266828+mohamed-azhar@users.noreply.github.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: wuyuansushen <43259764+wuyuansushen@users.noreply.github.com>
Co-authored-by: Tom Dykstra <tdykstra@microsoft.com>
Co-authored-by: Leo Spratt <enchant97@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Andy (Steve) De George <67293991+adegeo@users.noreply.github.com>
Co-authored-by: Radosław Rowicki <35342116+radrow@users.noreply.github.com>
Co-authored-by: Ken Dale <ken@kendaleiv.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏁 Release: .NET 6 Issues and PRs for the .NET 6 release dotnet-fundamentals/svc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants