Release Notes

1.0.27 (2020-08-18)

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


1.0.26 (2020-06-16)

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

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 '///'.

1.0.25 (2020-03-28)

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.

1.0.24 (2019-06-24)

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.

1.0.23 (2019-05-15)

Add NoSingleSpaceAfterTripleSlash and NoDocumentation analyzers.

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.

1.0.22 (2019-04-07)

Add ByteOrderMark analyzer and fix bugs.

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.

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.

1.0.20 (2019-02-19)

Add RedundantTypedArrayCreation and EmptyArrayCreation analyzers.

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


1.0.19 (2019-02-03)

Add TypeClassParameter analyzer.

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


1.0.18 (2019-01-18)

Change the schema of the configuration file to customize the behaviors of some analyzers.

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

  • Fix ThoughtlessName analyzer to report identifiers not allowed to use which are specified with the configuration file.
  • Fix DiscardingReturnValue analyzer to report the methods discarding the return value which are specified with the configuration file.
  • Add the help link URI to each analyzer.
  • Fix the NuGet package to contain readme.txt and some documents.
  • Merge Oxbind.CSharp 1.0.0.

Changed

  • Rename NoSpaceBeforeSemicolon and SpaceAfterSemicolon analyzer to SpaceBeforeSemicolon and NoSpaceAfterSemicolon, respectively.
  • Change the schema of the configuration file StyleChecker.xml. See README.md for details.

Fixed

  • Fix UnusedVariable and ThoughtlessName analyzers throwing InvalidOperationException with message 'Sequence contains no elements'.

1.0.17 (2018-12-09)

Fix bugs of some analyzers.

Requirements to run

  • Visual Studio 2017 (15.9) or .NET Core 2.1 (2.1.500)

Requirements to build

  • Visual Studio 2017 (15.9)

Fixed

  • Fix the bugs of UnusedVariable and ThoughtlessName analyzer throwing an exception when they handle catch clauses without an exception variable.

1.0.16 (2018-11-30)

Fix bugs of some analyzers.

Requirements to run

  • Visual Studio 2017 (15.9) or .NET Core 2.1 (2.1.500)

Requirements to build

  • Visual Studio 2017 (15.9)

Fixed

  • Fix the bugs of UnnecessaryUsing and ThoughtlessName analyzer throwing an exception when used with verbatim identifiers.
  • Fix ThoughtlessName analyzer to count parameters, out-var, pattern matching, catch and foreach.
  • Fix UnusedVariable analyzer to handle catch and foreach.

1.0.15 (2018-11-22)

Add NotDesignedForExtension analyzer and fix bugs.

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

  • Add NotDesignedForExtension analyzer.
  • Fix DiscardingReturnValue analyzer to count more methods. The added methods are of immutable types (e.g. string, Type, ImmutableArray and so on). See the description for details.
  • Fix DiscardingReturnValue analyzer to count the methods whose return value is annotated with the DoNotIgnoreAttribute. Note that the attribute is provided with the NuGet package StyleChecker.Annotations.

Changed

  • Update dependencies:
    • StyleCop.Analyzers 1.1.1-beta.61
    • Microsoft.CodeAnalysis.CSharp.Workspaces 2.10.0

Fixed

  • Fix AssignmentToParameter analyzer to report that a local variable passed by value if it is as follows:
    • incremented or decremented with the unary operator (i.e. ++ or -- )
    • passed to a method as a ref or out parameter.
  • Fix UnusedVariable analyzer to handle a verbatim identifier, that is a variable name starting with the special character '@'.
  • Fix IneffectiveReadByte analyzer throwing exceptions if the integer constant uses binary literals or digit separators, or if it cannot be represented with int.
  • Fix Underscore CodeFix provider to handle the identifier that contains only an underscore character.

1.0.14 (2018-11-03)

Add AssignmentToParameter analyzer and fix bugs of UnusedVariable analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add AssignmentToParameter analyzer.

Fixed

  • Fix UnusedVariable analyzer to ignore:
    • interfaces
    • abstract and extern methods
    • partial methods without the implementation
    • virtual empty methods
  • Fix UnusedVariable analyzer to ignore parameters annotated with UnusedAttribute. Note that the attribute is provided with the NuGet package StyleChecker.Annotations.
  • Fix UnusedVariable analyzer to report the parameters annotated with UnusedAttribute if the annotation is not necessary.
  • Fix Underscore, ThoughtlessName and UnusedVariable analyzers to count local variables declared with catch or foreach.

1.0.13 (2018-10-31)

Add UnusedVariable analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add UnusedVariable analyzer.

1.0.12 (2018-10-26)

Add DiscardingReturnValue analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add DiscardingReturnValue analyzer.

1.0.11 (2018-10-23)

Fix IneffectiveReadByte analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

Changed

  • Fix UnnecessaryUsing CodeFix provider to keep SyntaxTrivias around the using statement to be removed.
  • Fix IneffectiveReadByte CodeFix provider to enclose the CodeFix with a block statement.

Fixed

  • Fix IneffectiveReadByte analyzer to count parameters as well as local variables.
  • Fix bugs that IneffectiveReadByte analyzer throws NPE when the variable declaration of the for statement has no initializer, when the for statement has no declaration, or when the for statement has no condition.

1.0.10 (2018-10-21)

Add UnnecessaryUsing analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add UnnecessaryUsing analyzer.

Fixed

  • Fix IneffectiveReadByte analyzer to count auto-implemented properties.

1.0.9 (2018-10-15)

Add IneffectiveReadByte analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add IneffectiveReadByte analyzer.
  • Fix ThoughtlessName analyzer to report that Hungarian notation is used.

Fixed

  • Fix Underscore/ThoughtlessName analyzers to count pattern matching.

1.0.8 (2018-10-05)

Add ThoughtlessName analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add ThoughtlessName analyzer.

Fixed

  • Fix StaticGenericClass CodeFix provider to fix referencing codes.
  • Refactor test framework.

1.0.7 (2018-09-25)

Add SingleTypeParameter and StaticGenericClass analyzers.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add SingleTypeParameter analyzer.
  • Add StaticGenericClass analyzer. Note that this analyzer is under development so that the CodeFix provider doesn't fix referencing codes.
  • Add the document of the InvalidConfig analyzer.

1.0.6 (2018-09-08)

Add UnusedUsing analyzer again, and add InvalidConfig analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add UnusedUsing analyzer again.
  • Add InvalidConfig analyzer. It reports errors of the configuration file StyleChecker.xml.

Changed

  • Fix LongLine analyzer to count XML documentation comment.

Fixed

  • Fix the following warning, with changing the target framework to netstandard1.3.

... depends on 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well.


1.0.5 (2018-09-02)

Remove UnusedUsing analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

Removed

  • Remove UnusedUsing analyzer.

Fixed

  • Refactor test cases.
  • Update dependencies.

1.0.4 (2018-08-30)

Add UnusedUsing analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add UnusedUsing analyzer.
  • Add a description of analyzers.

Changed

  • Fix Underscore analyzer to count Out Variable Declarations, local functions, and parameters.

Fixed

  • Fix dependencies to remove the dependency on StyleCop Analyzers.

1.0.3 (2018-08-14)

Add NoSpaceBeforeSemicolon and SpaceAfterSemicolon analyzers.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add NoSpaceBeforeSemicolon and SpaceAfterSemicolon analyzers. They point out spacing around a semicolon, especially in for statements. The style for (;;) of an infinite for loop is allowed. Note that this rule is intended to replace SA1002.
  • Add documents like README, COPYRIGHT, and so on.
  • Add a way to configure analyzers with the file StyleChecker.xml in the project root.

Changed

  • Fix the LongLine analyzer to read the maximum line length from the file StyleChecker.xml.

Changed

  • Fix the LongLine analyzer to read the maximum line length from the file StyleChecker.xml.

1.0.2 (2018-07-25)

Add the PostIncrement analyzer.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add the PostIncrement analyzer (with code fix provider). It points out post-increment/decrement operators (e.g. i++) if they can be replaced with pre-increment/decrement ones.

1.0.1 (2018-07-24)

Consider auto-generated .cs files.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

Fixed

  • Fix to suppress analyzing auto-generated files.

1.0.0 (2018-07-23)

Initial release.

Requirements to run

  • Visual Studio 2017 or .NET Core 2.1

Requirements to build

  • Visual Studio 2017

New

  • Add the LongLine analyzer. It points out the line equal or over 80 columns. Note that it ignores multi-line comments and XML documentation comments.
  • Add the Underscore analyzer (with code fix provider). It points out an underscore character included in the identifier of local variables.