Skip to content
Michael Damatov edited this page Apr 27, 2020 · 16 revisions

Welcome to the ReCommended-Extension wiki!

C# Analyzers

Redundant null-forgiving operators or assertions

  • Analyzes the null-forgiving operators or 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 the throw statements and highlights exceptions that should never be thrown. show more...
  • Analyzes the catch clauses and highlights exceptions that should never be caught. show more...
  • Analyzes whether exceptions are thrown in unexpected locations. show more...
  • Analyzes when Exception is caught without declaring the exception variable. show more...

await expressions

  • Analyzes whether the async/await keywords are redundant. show more...
  • 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...

async void methods

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

show more...

Array initializations

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

Initialization of ArgumentException (or descendant) objects

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

Locks

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

Redundant Invoke usages

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

Conditional methods and attributes

  • Dims the method invocations if the method has the [Conditional] annotation, e.g. Debug.Assert(...).
  • Dims the attribute usage 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 the invocation of methods annotated with [NotifyPropertyChangedInvocator] from the class constructor. show more...

Regions

C# Context Actions

Set language injection

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

Configure the await expression

Remove inline assertion

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

XAML Analyzers

Binding expressions

  • Checks binding expressions without explicitly set Mode. show more...