C# 12 Support and New Enhancements
maroontress-tomohisa
released this
17 May 12:07
·
4 commits
to main
since this release
Requirements to run
- Visual Studio 2022 (17.9.6) or .NET 8 (SDK 8.0.204)
Requirements to build
- Visual Studio 2022 (17.9.6) or .NET 8 (SDK 8.0.204)
New
- Handle C# 12 source codes
- Add NoSpaceAfterBrace and NoSpaceBeforeBrace analyzers
- EqualsNull analyzers provides a new option of Code Fix to replace:
… != null
or… != null
with the property pattern… is {}
or!(… is {})
- IsNull analyzers provides a new option of Code Fix to replace:
!(… is null)
or… is null
with the property pattern… is {}
or!(… is {})
Removed
- Remove the VSIX project from the solution
Changed
- Work with Visual Studio 2022
- Update dependent packages
- Improve installation: no longer need to manually edit
csproj
files - Perform CI with GitHub Actions
- Switch
LangVersion
to12.0
- Reformat source files with File-scoped namespace declarations
- Refactor with C# 12 features
- Enable
EnforceExtendedAnalyzerRules
- Add test cases
Fixed
- Fix warnings
- Fix SingleTypeParameter analyzer to ignore the following cases:
- The type name is
T
and it has one type parameter (e.g.,public class T<U> …
) - The type
T
is already contained in the type or member
- The type name is
- Fix documents