Skip to content

Releases: maroontress/StyleChecker

Fix some analyzers

12 Jun 06:04
73173da

Choose a tag to compare

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 LangVersion to 13

Fixed

Add new analyzers and fix bugs

08 Mar 23:23
22b16b4

Choose a tag to compare

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

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 new expression
      • Collection expression
      • null literal
      • default literal
    • replace an ArrayCreationExpression node with an ImplicitArrayCreationExpression node
    • remove the period at the end of the sentence in the Code Fix titles

Fix NoSingleSpaceAfterTripleSlash analyzer

27 Feb 12:46
97a27e2

Choose a tag to compare

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.

Fix StinkyBooleanExpression analyzer

12 Jan 11:36
2723699

Choose a tag to compare

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

13 Aug 17:11
5519b78

Choose a tag to compare

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 Hello and See in the example.

C# 12 Support and New Enhancements

17 May 12:07
7b94ec2

Choose a tag to compare

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 to 12.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
  • Fix documents

Add UninitializedLocalVariable and NotOneShotInitialization analyzers.

18 Aug 12:19
6257c2c

Choose a tag to compare

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 StrayText and StinkyBooleanExpression analyzers.

16 Jun 11:20
cb04f0a

Choose a tag to compare

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

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.
  • 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.

28 Mar 04:38
655d70e

Choose a tag to compare

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.

24 Jun 13:07
e237ad7

Choose a tag to compare

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.