Releases: maroontress/StyleChecker
Releases · maroontress/StyleChecker
Fix some analyzers
Requirements to run
- Visual Studio 2022 (17.14.0) or .NET 9 (SDK 9.0.300)
Requirements to build
- Visual Studio 2022 (17.14.0) or .NET 9 (SDK 9.0.300)
Changed
- Fix the project structure
- Update Microsoft.CodeAnalysis.CSharp.Workspaces to 4.14.0
- Update dependent packages
- Switch
LangVersionto13
Fixed
- Fix Underscore analyzer to ignore lambda discard parameters
- Fix TypeClassParameter analyzer to:
- ignore methods and local functions used as a Method Reference
- rename a method on Visual Studio IDE
Add new analyzers and fix bugs
Requirements to run
- Visual Studio 2022 (17.13.2) or .NET 9 (SDK 9.0.200)
Requirements to build
- Visual Studio 2022 (17.13.2) or .NET 9 (SDK 9.0.200)
New
- Add NoUsingDeclaration analyzer
- Add NullCheckAfterDeclaration analyzer
Fixed
- Fix SingleTypeParameter analyzer to:
- ignore the type parameter that causes compilation errors or warnings when applying the code fix.
- remove the period at the end of the sentence in the Code Fix titles
- Fix RedundantTypedArrayCreation analyzer to:
- ignore explicitly typed array creation where all the elements are one of the following:
- Target-typed
newexpression - Collection expression
nullliteraldefaultliteral
- Target-typed
- replace an
ArrayCreationExpressionnode with anImplicitArrayCreationExpressionnode - remove the period at the end of the sentence in the Code Fix titles
- ignore explicitly typed array creation where all the elements are one of the following:
Fix NoSingleSpaceAfterTripleSlash analyzer
Requirements to run
- Visual Studio 2022 (17.13.1) or .NET 9 (SDK 9.0.200)
Requirements to build
- Visual Studio 2022 (17.13.1) or .NET 9 (SDK 9.0.200)
Fixed
- Fix NoSingleSpaceAfterTripleSlash analyzer to:
- work with CDATA sections (
<![CDATA[…]]>). - remove the period at the end of the sentence in the Code Fix titles.
- work with CDATA sections (
Fix StinkyBooleanExpression analyzer
Requirements to run
- Visual Studio 2022 (17.12.3) or .NET 9 (SDK 9.0.101)
Requirements to build
- Visual Studio 2022 (17.12.3) or .NET 9 (SDK 9.0.101)
Fixed
- Fix StinkyBooleanExpression analyzer not to issue diagnostics against the conditional operators that contain a Throw Expression, such as
(b ? true : throw new Exception(…)).
Fix NoSingleSpaceAfterTripleSlash analyzer
Requirements to run
- Visual Studio 2022 (17.10.5) or .NET 8 (SDK 8.0.303)
Requirements to build
- Visual Studio 2022 (17.10.5) or .NET 8 (SDK 8.0.303)
Changed
-
Fix NoSingleSpaceAfterTripleSlash analyzer not to issue diagnostics when there are characters that start with a whitespace character and contain a non-whitespace character between
///and an XML element, as in the following code:/// Hello <summary>World.</summary> /// See <seealso cref="Bad"/> public static void Bad() { }
Note that StrayText analyzer still issues diagnostics against the
HelloandSeein the example.
C# 12 Support and New Enhancements
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:
… != nullor… != nullwith the property pattern… is {}or!(… is {})
- IsNull analyzers provides a new option of Code Fix to replace:
!(… is null)or… is nullwith 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
csprojfiles - Perform CI with GitHub Actions
- Switch
LangVersionto12.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
Tand it has one type parameter (e.g.,public class T<U> …) - The type
Tis already contained in the type or member
- The type name is
- Fix documents
Add UninitializedLocalVariable and NotOneShotInitialization analyzers.
Requirements to run
- Visual Studio 2017 (15.9) or .NET Core 2.1 (2.1.500)
Requirements to build
- Visual Studio 2019 (16.7)
New
- Add UninitializedLocalVariable analyzer. See the description for details.
- Add NotOneShotInitialization analyzer. See the description for details.
Add StrayText and StinkyBooleanExpression analyzers.
Requirements to run
- Visual Studio 2017 (15.9) or .NET Core 2.1 (2.1.500)
Requirements to build
- Visual Studio 2019 (16.5)
New
- Add StrayText analyzer. See the description for details.
- Add StinkyBooleanExpression analyzer. See the description for details.
Fixed
- NoSingleSpaceAfterTripleSlash:
- Allow a tab character in addition to a space character after '
///'. - Ignore the top-level text in the Documentation Comments, which is not inside any XML tag.
- Allow a tab character in addition to a space character after '
- TypeClassParameter:
- Fix the analyzer to emit diagnostics to the private methods with the editor of Visual Studio 2019.
- Fix the code fix provider to rename the method that has the same method signature as the modified method.
Changed
- Fix NoSingleSpaceAfterTripleSlash analyzer to emit the diagnostics whose location is just after '
///'.
Fix some bugs.
Requirements to run
- Visual Studio 2017 (15.9) or .NET Core 2.1 (2.1.500)
Requirements to build
- Visual Studio 2019 (16.5)
Fixed
- Fix DiscardingReturnValue, EmptyArrayCreation, EqualsNull, IneffectiveReadByte, RedundantTypedArrayCreation, TypeClassParameter, and UnnecessaryUsing analyzers possibly throwing an NRE.
- RedundantTypedArrayCreation:
- Fix typo in the diagnostic messages.
- Fix the CodeFix provider to correct nested arrays.
- Improve diagnostic messages.
- StaticGenericClass:
- Fix the CodeFix provider to rename the type name to the unique name when the other type that has the same name already exists.
- Underscore:
- Fix typo in the diagnostic messages.
- Improve diagnostic messages, especially just for the underscore that is not a discard.
Fix the bug of the NotDesignedForExtension analyzer.
Requirements to run
- Visual Studio 2017 (15.9) or .NET Core 2.1 (2.1.500)
Requirements to build
- Visual Studio 2019 (16.0)
Fixed
- Fix the NotDesignedForExtension analyzer to emit the diagnostics with the virtual method that has a non-empty block.
- Fix the ByteOrderMark analyzer to handle
UnauthorizedAccessException. - Fix and improve documents, adding a default severity and the cover image to each description of diagnostics.