Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

DotNetAnalyzers/BannedApiAnalyzer

Repository files navigation

Banned API Analyzer for the .NET Compiler Platform

NuGet NuGet Beta

Join the chat at https://gitter.im/DotNetAnalyzers/BannedApiAnalyzer

Build status

codecov.io

This repository contains an implementation of .NET banned API rules using the .NET Compiler Platform. Where possible, code fixes are also provided to simplify the process of correcting violations.

Using BannedApiAnalyzer

The preferable way to use the analyzers is to add the nuget package DotNetAnalyzers.BannedApiAnalyzer to the project where you want to enforce banned API rules.

The severity of individual rules may be configured using rule set files in Visual Studio 2015 or newer. See Configuration.md for more information.

For documentation and reasoning on the rules themselves, see the DOCUMENTATION.md.

Installation

BannedApiAnalyzer requires Visual Studio 2017 version 15.5 or newer, or the equivalent command line compiler tools.

BannedApiAnalyzer can be installed using the NuGet command line or the NuGet Package Manager in Visual Studio 2017.

Install using the command line:

Install-Package DotNetAnalyzers.BannedApiAnalyzer

⚠ Prereleases of the DotNetAnalyzers.BannedApiAnalyzer package use Semantic Versioning 2, which requires NuGet 4.3.0 (Visual Studio 2017 version 15.3) or newer. Users with clients that do not support Semantic Versioning 2 may install prereleases using the DotNetAnalyzers.BannedApiAnalyzer.Unstable package instead.

Team Considerations

If you use older versions of Visual Studio in addition to Visual Studio 2017 or Visual Studio 2019, you may still install these analyzers. They will be automatically disabled when you open the project back up in versions of Visual Studio prior to Visual Studio 2017 version 15.5.

Contributing

See CONTRIBUTING.md

Current status

An up-to-date list of which banned API rules are implemented and which have code fixes can be found here.

About

Banned API analyzer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published