Skip to content

A set of Roslyn analyzers for diagnostic/fix of various asynchronous practices.

License

Notifications You must be signed in to change notification settings

holthe/AsyncAnalyzers

Repository files navigation

AsyncAnalyzers Build Status Latest version NuGet License

This repository contains a set of diagnostic extensions for the .NET Compiler Platform ("Roslyn") regarding asynchronous practices.

Build Status

Compilation and build status are provided by Travis CI. The VSIX project is not being built at the moment.

Branch Status
master Build Status
develop Build Status

Getting Started

Install NuGet package (preferred method)

To install AsyncAnalyzers, run the following command in the Package Manager Console

Install-Package AsyncAnalyzers

or the following command for .NET CLI

dotnet add package AsyncAnalyzers

Install from GitHub Releases

Travis CI deploys the latest NuGet package to GitHub Releases along with its SHA-256 hash after it has been pushed to the NuGet Gallery.

  1. Download the latest release (.nupkg and .sha256 files) and check the SHA-256 hash of the downloaded .nupkg file, e.g. for release v1.1.5:
sha256sum -c AsyncAnalyzers.1.1.5.0.nupkg.sha256

which should output AsyncAnalyzers.1.1.5.0.nupkg: OK.

  1. Install the downloaded package
Install-Package C:\[PathToThePackageDir]\AsyncAnalyzers.1.1.5.0.nupkg

Install from source

  1. Clone the repository and build the solution (optionally with rake).
  2. Add the analyzer to a given solution by copying the AsyncAnalyzers.dll and adding a reference to it under References/Analyzers for each of the projects in the solution.

Prerequisites

In order to build this solution using rake, you need to install albacore version 2.6.1:

gem install albacore -v 2.6.1

Note that this requires ruby version >= 2.1.0.

Running the tests

The tests are written using the xUnit testing framework and can be run directly from within Visual Studio or from the commandline using rake. The default task in Rakefile runs the tests after performing a NuGet package restore and building the solution for Release, so one can simply issue the rake command. Alternately, run the xunit_tests task directly:

rake xunit_tests

which assumes that the solution has previously been built for Release configuration and that artifacts from this build are present in the output folders for the AsyncAnalyzers and AsyncAnalyzers.Test projects.

License License

This project is licensed under the MIT License - see the LICENSE.md file for details.