Faithlife.Analyzers
1.7.1
Prefix Reserved
dotnet add package Faithlife.Analyzers --version 1.7.1
NuGet\Install-Package Faithlife.Analyzers -Version 1.7.1
<PackageReference Include="Faithlife.Analyzers" Version="1.7.1" />
<PackageVersion Include="Faithlife.Analyzers" Version="1.7.1" />
<PackageReference Include="Faithlife.Analyzers" />
paket add Faithlife.Analyzers --version 1.7.1
#r "nuget: Faithlife.Analyzers, 1.7.1"
#:package Faithlife.Analyzers@1.7.1
#addin nuget:?package=Faithlife.Analyzers&version=1.7.1
#tool nuget:?package=Faithlife.Analyzers&version=1.7.1
Faithlife.Analyzers
Roslyn-based C# code analyzers used on Faithlife source code.
How to Use
The simplest way to use the latest Faithlife analyzers is to add a global package reference to your Directory.Packages.props:
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
</PropertyGroup>
<ItemGroup>
<GlobalPackageReference Include="Faithlife.Analyzers" Version="1.*" />
</ItemGroup>
You don't need to enable floating versions if you specify a specific version.
If you're not using central package management, add a PackageReference to each .csproj:
<ItemGroup>
<PackageReference Include="Faithlife.Analyzers" Version="1.2.0" PrivateAssets="All" IncludeAssets="runtime; build; native; contentfiles; analyzers" />
</ItemGroup>
To disable a particular analzyer, add a line to your .editorconfig under [*.cs]. For example:
[*.cs]
dotnet_diagnostic.FL0009.severity = none
Analyzers
| ID | Description |
|---|---|
| FL0001 | AsyncWorkItem.Current must only be used in methods that return IEnumerable<AsyncAction> |
| FL0002 | Optional StringComparison arguments must always be specified |
| FL0003 | UntilCanceled() may only be used in methods that return IEnumerable<AsyncAction> |
| FL0004 | Use operator== or a non-ordinal StringComparison |
| FL0005 | Avoid ToReadOnlyCollection in constructors |
| FL0006 | Optional IComparer<string> arguments must always be specified |
| FL0007 | Avoid $ in interpolated strings |
| FL0008 | WorkState.None and WorkState.ToDo must not be used when an IWorkState is available |
| FL0009 | Prefer "" over string.Empty |
| FL0010 | Prefer modern language features over IfNotNull |
| FL0011 | GetOrAddValue should not be used with ConcurrentDictionary |
| FL0012 | DbConnector.Command should not be used with an interpolated string |
| FL0013 | Do not use Uri.ToString() |
| FL0014 | Interpolated strings should not be used without interpolation |
| FL0015 | Prefer null-conditional operators over ternaries |
| FL0016 | Verbatim strings should only be used with certain special characters |
| FL0017 | Do not use a switch expression on a constant value |
| FL0018 | Prefer string interpolation over FormatInvariant |
| FL0019 | Local Functions as Event Handlers |
| FL0020 | Lambda Expressions as Event Handlers |
| FL0021 | Use null propagation |
| FL0022 | Use AsyncMethodContext.WorkState |
| FL0023 | Replace obsolete Logos.Common.Logging.Extensions extension methods |
| FL0024 | Lambda operators should end the previous line |
| FL0025 | Private fields should be defined last |
| FL0026 | Use InvariantConvert |
How to Help
- Improve the documentation in the docs/ directory, especially by adding rationale for rules or instructions for how to choose between multiple fixes.
- Suggest new analyzers by opening an issue. Please add the
new analyzerlabel. - Vote for analyzers you would find particularly helpful by adding a 👍 reaction.
- Implement a new analyzer from this list of the most popular.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.7.1 | 1,835 | 6/15/2026 |
| 1.7.0 | 1,447 | 6/12/2026 |
| 1.6.2 | 3,164 | 5/27/2026 |
| 1.6.1 | 345 | 5/27/2026 |
| 1.6.0 | 2,590 | 5/1/2026 |
| 1.6.0-beta.2 | 17,140 | 11/6/2025 |
| 1.6.0-beta.1 | 2,339 | 10/2/2025 |
| 1.5.1 | 52,221 | 7/3/2025 |
| 1.5.0 | 113,668 | 2/23/2024 |
| 1.4.0 | 78,227 | 1/18/2023 |
| 1.3.1 | 30,960 | 10/14/2022 |
| 1.3.0 | 737 | 10/13/2022 |
| 1.2.1 | 7,913 | 11/5/2021 |
| 1.2.0 | 1,896 | 10/23/2021 |
| 1.1.0 | 661 | 10/15/2021 |