Skip to content

Releases: maroontress/StyleChecker

Fix NoSingleSpaceAfterTripleSlash analyzer

13 Aug 17:11
5519b78
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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.

Add NoSingleSpaceAfterTripleSlash and NoDocumentation analyzers.

15 May 13:45
d491ce2
Compare
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)

New

  • Add NoSingleSpaceAfterTripleSlash analyzer and code fix provider. See the description for details.
  • Add NoDocumentation analyzer. See the description for details.

Changed

  • Fix ByteOrderMark analyzer to ignore I/O errors.

Fixed

  • Fix DiscardingReturnValue analyzer and IneffectiveReadByte code fix provider to be built on the Linux platform.
  • Fix EmptyArrayCreation, EqualsNull and IsNull analyzers to be in the Refactoring category.

Add ByteOrderMark analyzer and fix bugs.

07 Apr 10:15
a2bd164
Compare
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 2017 (15.9)

New

Changed

  • Remove StyleChecker.Annotations and Maroontress.Oxbind from the source tree. Instead, integrate them with NuGet.

Fixed

  • Fix EqualsNull CodeFix provider to show the correct title message.
  • Fix SingleTypeParameter analyzer to count a verbatim symbol.
  • Fix UnusedVariable analyzer to count local function's parameters.
  • Fix UnusedVariable analyzer to count parameters of the constructors and methods of structs.

Add EqualsNull and IsNull analyzers and fix some bugs.

15 Mar 15:42
cb596a3
Compare
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 2017 (15.9)

New

Changed

  • Fix UnnecessaryUsing analyzer to count more classes: System.IO.StringReader, System.IO.StringWriter and System.IO.UnmanagedMemoryAccessor.

Fixed

  • Fix bugs of RedundantTypedArrayCreation, PostIncrement, EmptyArrayCreation, IneffectiveReadByte, StaticGenericClass, TypeClassParameter and UnnecessaryUsing code fix providers to work in some cases. For example, the EmptyArrayCreation code fix provider is fixed to work if there is an empty array creation as an argument.
  • Fix bugs of TypeClassParameter analyzer to count the typeof operator with the operand that is static class.

Add RedundantTypedArrayCreation and EmptyArrayCreation analyzers.

19 Feb 11:10
cb3756f
Compare
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 2017 (15.9)

New