Skip to content
Michael Damatov edited this page Feb 29, 2024 · 15 revisions

Welcome to the ReCommended-Extension wiki!

C# Analyzers

Redundant assertions

  • Analyzes assertion statements and highlights them if they can be removed. show more...

Annotations

  • Analyzes not allowed, missing, or redundant usages of the [NotNull] and [CanBeNull] annotations.
  • Analyzes not allowed [ItemNotNull] annotations.
  • Analyzes [SuppressMessage] annotations without justifications.
  • Analyzes simultaneously used [Pure] and [MustUseReturnValue] annotations.

show more...

Exceptions

  • Analyzes throw statements and highlights exceptions that should never be thrown. show more...
  • Analyzes catch clauses and highlights exceptions that should never be caught. show more...
  • Analyzes whether exceptions are thrown in unexpected locations. show more...
  • Analyzes when the Exception is caught without declaring an exception variable. show more...

await expressions

  • Analyzes whether adding .ConfigureAwait(false) is recommended. show more...

ValueTask/ValueTask<T> usages

  • Analyzes whether ValueTask or ValueTask<T> values consumed more than once. show more...
  • Analyzes whether .GetAwaiter().GetResult() is invoked for a ValueTask or ValueTask<T> show more...

async void methods

  • Analyzes "async void" methods and local functions and highlights when used inappropriately.
  • Analyzes "async" lambda expressions (and anonymous methods as well) that return void.

show more...

Collections

  • Suggests using collection expressions
  • Suggests using Array.Empty<T>() to reuse the immutable instance.
  • Suggests using new T[n] to improve code readability, where n is the element count. show more...

show more...

Initialization of ArgumentException (or descendant) objects

  • Analyzes whether parameter names are passed where the message argument is expected. show more...

Locks

  • Analyzes lock statements and warns when objects with weak identities are used. show more...
  • Analyzes whether yield return statement is used inside lock blocks. show more...

IEquatable<T>

  • Suggests declaring an implemention of IEqualityOperators<T, T, bool> when IEquatable<T> is implemented for the type.
  • Warns when a struct overrides Equals without implementing the IEquatable<T>.
  • Warns when a type implements the IEquatable<T> interface without overring Equals.

show more...

IComparable<T>

  • Suggests declaring an implemention of IComparisonOperators<T, T, bool> when IComparable<T> is implemented for the type. show more...

Redundant Invoke usages

  • Analyzes whether Invoke can be omitted for delegate types. show mode...

Conditional methods and attributes

  • Dims method invocations if the method has the [Conditional] annotation, e.g. Debug.Assert(...).
  • Dims attribute usages if the attribute class has the [Conditional] annotation, e.g. [SuppressMessage].

show more...

Constructors

  • Suggests using more appropriate visibility for internal constructors in abstract classes. show more...
  • Analyzes invocations of methods annotated with the [NotifyPropertyChangedInvocator] from class constructors. show more...

Regions

C# Context Actions

Declare implementation of

  • IEqualityOperators<T, T, bool>
  • IComparisonOperators<T, T, bool>

show more...

Set language injection

  • Puts a C# comment to indicate that the next string literal contains a piece of code written in one of the programming languages supported by ReSharper (e.g. JSON, XML, CSS, HTML, regular expression, etc.) show more...

Add code contract

  • Suggests adding code contracts for commonly used scenarios. show more...

Annotate with

  • [NonNegativeValue]
  • [Pure]
  • [MustUseReturnValue]
  • [InstantHandle]
  • [LinqTunnel]

show more...

XML Doc Comments

  • Embrace with <c>...</c>
  • Embed into <see cref="..."/>
  • Embed into <typeparamref name="..."/>
  • Embed into <paramref name="..."/>
  • Reflow XML doc comments

show more...

Remove inline assertion

  • Suggests to remove the AssertNotNull expression. show more...

XAML Analyzers

Binding expressions

  • Checks binding expressions without explicitly set Mode. show more...
Clone this wiki locally