Skip to content

Releases: Vannevelj/VSDiagnostics

VSDiagnostics

18 Mar 19:08
Compare
Choose a tag to compare

New features

Category Name Description
General VSD0063 A GetHashCode implementation refers to a mutable field.
Async VSD0064 Async methods should return a Task to make them awaitable.
Exceptions VSD0065 A null object is attempted to get thrown.

Bug fixes

  • #575 Expanded VSD0023 to also support lock, fixed and switch statements
  • #615 Don't fire VSD0047 when used as a type parameter
  • #618 Don't fire VSD0007 when the variable name is "value"

VSDiagnostics

12 Nov 15:28
Compare
Choose a tag to compare

VSDiagnostics

23 Feb 03:43
Compare
Choose a tag to compare

This new release focused on bug fixes and maintenance rather than a slew of new features.

New features

Category Name Description
Async VSD0041 A non-async, non-Task method should not end with -Async.
Strings VSD0042 A string.Format() call lacks arguments and will cause a runtime exception

Bug fixes

  • No more random NullReferenceException when certain analyzers are triggered that use the IsDefinedInAncestor helper
  • Completely rewrote the "TryCast vs As/Not null" analyzer which makes it much more reliable in many different scenarios
  • "Use explicit modifier" is no longer a message but instead works as a context action
  • Changing a field to a property will no longer be suggested when the field is passed as ref or out inside that same class. If it is passed outside of it, it is still triggered and will introduce uncompilable code.
  • Explicit interface implementations and partial methods no longer suggest an access modifier.
  • Clarified message for the empty catch block analyzer.
  • A rename IDE helper is added when conflicts due to renaming occur.
  • No longer renaming when changing a field to a property.
  • Using string.Empty now respects surrounding trivia.
  • No more NullReferenceExceptions when using a doc comment that references Nullable{T}
  • Naming conventions now handle different situations better, including SNAKE_UPPER_CASE
  • No more NullReferenceException when defining an enum
  • "OnPropertyChangedWithoutNameOf" now triggers on parenthesized expressions as well and triggers in partial classes too.
  • Using an alias respects surrounding trivia.
  • Improved VSD0036's message
  • No longer trigger the string.Empty suggestion for case labels
  • Improved 'Use alias' suggestions when affected by using statements

All closed issues can be found here:
https://github.com/Vannevelj/VSDiagnostics/issues?page=1&q=milestone%3Av1.9.2+is%3Aclosed

VSDiagnostics

01 Nov 20:56
Compare
Choose a tag to compare
VSDiagnostics Pre-release
Pre-release

Due to a small bundling issue of the NuGet release, v1.9.1-beta is the same as v1.9.0-beta but it should actually work this time.

VSDiagnostics

01 Nov 17:02
Compare
Choose a tag to compare
VSDiagnostics Pre-release
Pre-release

Finally, the next version of VSDiagnostics is here!

After two months of on-and-off work and a lot of collaboration help from @Hosch250, we can now distribute the next version of VSDiagnostics. This release contains a bunch of bug fixes and new features (obviously) and we also updated some dependencies like RoslynTester. This allowed us to more reliably test our diagnostics and as such reinforces our belief in solid workings. Nothing is bug-free however so we won't claim we are either. This release has been marked as pre-release to indicate that we would like further testing from you in a real-world scenario. Try out this new version and let us know if something behaves in a way you don't expect so we can fix that for the actual release!

Special thanks to @nemec as well for providing an analyzer.

New features

Category Name Description
Attributes VSD0002 Attributes with empty argument lists can have the argument list removed.
Attributes VSD0003 Gives an enum the [Flags] attribute.
Attributes VSD0004 [Flags] enum its values are not explicit powers of 2
Attributes VSD0039 [Flags] enum its values are not explicit powers of 2 and does not fit in the specified enum type.
Attributes VSD0005 Complains if the [Obsolete] attribute is used without an explicit reason.
Attributes VSD0006 The OnPropertyChanged() method can automatically get the caller member name.
General VSD0013 Allows you to change as statements to cast statements.
General VSD0014 Allows you to change cast statements to as statements.
General VSD0015 A boolean expression doesn't have to be compared to false.
General VSD0016 A boolean expression doesn't have to be compared to true.
General VSD0017 The conditional operator shouldn't return redundant true and false literals.
General VSD0018 The conditional operator shouldn't return redundant false and true literals.
General VSD0019 Complains about if statements of the form if (statement) { /* body */ }, where "statement" is always evaluates to false.
General VSD0020 Complains about if statements of the form if (statement) { /* body */ }, where "statement" is always evaluates to true.
General VSD0021 Inserts the default access modifier for a declaration.
General VSD0022 Detects usage of the goto keyword.
General VSD0030 Warns about using a redundant default constructor.
General VSD0033 Use the built-in type aliases instead the concrete type.
Strings VSD0035 Adjusts the placeholders in string.Format() calls to be in numerical order.
Structs VSD0036 Warns when a struct attempts to assign 'this' to a new instance of the struct.
Tests VSD0037 Test methods do not need to use the "Test" suffic.

Bug fixes

  • When renaming a symbol that causes a naming conflict, it will highlight the symbol and allow you to rename it yourself immediately
  • Subclassing a subclass of ArgumentException no longer crashes when it tries to complain about the lack of nameof()
  • Enums weren't considered for naming conventions
  • An empty catch clause no longer shows a warning when it contains comments
  • Proper handling of methods that are async but overridden from elsewhere.
  • The squiggly line to simplify an expression-bodied member is now displayed on the method name
  • Using Nullable<> no longer breaks stuff
  • The TypeToVar analyzer is now hidden and works as a context-action without any notifications
  • Using a switch statement when simplifying an expression-bodied member no longer breaks things
    • This counts for anything with a scope
  • No longer strange 'no braces' messages with else statements
  • Interface naming conventions fixed so they would rename ifoo to IFoo instead of IIFoo
  • Typing slowly no longer crashes due to checking certain characters for naming conventions compliance
  • Using an object initializer no longer crashes ArgumentExceptionWithoutNameOfAnalyzer
  • No longer suggests simplifying an expression-bodied member with a set body
  • No longer crashes when you type an attribute because of ObsoleteAttributeWithoutReason
  • Renaming now renames all references
  • Lots of minor formatting bugs fixed

VSDiagnostics

05 Aug 00:31
Compare
Choose a tag to compare

First stable release! Updated the dependencies to be in line with Visual Studio 2015's release and removed beta dependencies from NUnit.

VSDiagnostics

26 Jun 19:15
Compare
Choose a tag to compare
VSDiagnostics Pre-release
Pre-release

No new features in this release but several bugfixes and maintenance tasks instead. The full list of changes can be found here but in summary:

Bugfixes

  • No more "empty string literal" warnings for attributes.
  • Writing an incomplete method no longer crashes the analyzer.
  • Improved SimplifyExpressionBodiedMember when it comes to trivia and attributes.
  • private fields marked as constant or static now expect UpperCamelCase.

Tasks

  • There are no longer dependencies on nightly builds: everything is based on RC2.
  • Tests are now using RoslynTester v1.3.0 which means they are less verbose.
  • Integrated build server in the releasing process.
  • Renamed ArgumentExceptionWithNameofOperator to ArgumentExceptionWithoutNameofOperator.
  • Cleaned up internal visibility.

VSDiagnostics

03 Jun 20:46
Compare
Choose a tag to compare
VSDiagnostics Pre-release
Pre-release

This new release introduces several new features ( #6 #9 #10 #25 ) and a bug fix ( #72 ). For details, take a look a the exact issues. Special thanks to @ragnarok56 for contributing the EmptyCatchClause diagnostic.

Category Name Description Analyzer Code Fix
General NonEncapsulatedOrMutableField A public, internal or protected internal non-const, non-readonly field should be used as a property. Yes Yes
Exceptions EmptyCatchClause Warns when an exception catch block is empty. Yes No
General TryCastWithoutUsingAsNotNull A conversion can be done using as + a null comparison. Yes Yes
General NamingConventions Implements the most common configuration of naming conventions. Yes Yes

These were some tricky features, particularly the try-cast one and the naming conventions. Let us know if you encounter any issues!

VSDiagnostics

30 May 14:32
Compare
Choose a tag to compare
VSDiagnostics Pre-release
Pre-release

This release includes 1 new feature ( #59 ) which provides additional C# 6 support and two bugfixes ( #62 #64 ).

Category Name Description Analyzer Code Fix
General SimplifyExpressionBodiedMember Simplify the expression using an expression-bodied member. Yes Yes

VSDiagnostics

29 May 17:37
Compare
Choose a tag to compare
VSDiagnostics Pre-release
Pre-release

This new release includes 3 new diagnostics ( #30 #5 #17 ) and a bug fix ( #49 ).

Special thanks goes out to @ragnarok56 for contributing the TypeToVar analyzer in this release.

Category Name Description Analyzer Code Fix
General CompareBooleanToTrueLiteral A boolean expression doesn't have to be compared to true. Yes Yes
General TypeToVar Use var instead of an explicit type. Yes Yes
General OnPropertyChangedWithoutNameOfOperator Use the nameof() operator in conjunction with OnPropertyChanged Yes Yes