ANcpLua.Analyzers
1.10.7
See the version list below for details.
dotnet add package ANcpLua.Analyzers --version 1.10.7
NuGet\Install-Package ANcpLua.Analyzers -Version 1.10.7
<PackageReference Include="ANcpLua.Analyzers" Version="1.10.7"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="ANcpLua.Analyzers" Version="1.10.7" />
<PackageReference Include="ANcpLua.Analyzers"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add ANcpLua.Analyzers --version 1.10.7
#r "nuget: ANcpLua.Analyzers, 1.10.7"
#:package ANcpLua.Analyzers@1.10.7
#addin nuget:?package=ANcpLua.Analyzers&version=1.10.7
#tool nuget:?package=ANcpLua.Analyzers&version=1.10.7
ANcpLua.Analyzers
Roslyn analyzers for modern C# patterns. Catches common mistakes at compile time with automatic code fixes.
Installation
dotnet add package ANcpLua.Analyzers
Using ANcpLua.NET.Sdk? This package is auto-injected - no installation needed.
Rules
| Rule | Severity | Description |
|---|---|---|
| AL0001 | Error | Don't reassign primary constructor parameters |
| AL0002 | Warning | Don't repeat negated patterns |
| AL0003 | Error | Don't divide by constant zero |
| AL0004 | Warning | Use is for Span constant comparison |
| AL0005 | Warning | Use SequenceEqual for Span comparison |
| AL0006 | Warning | Field conflicts with primary constructor param |
| AL0007 | Warning | GetSchema should be explicit interface |
| AL0008 | Warning | GetSchema must return null |
| AL0009 | Warning | Don't call IXmlSerializable.GetSchema |
| AL0010 | Info | Type should be partial for generators |
| AL0011 | Warning | Use Lock type instead of lock keyword |
| AL0012 | Warning | Deprecated OTel semantic convention |
| AL0013 | Info | Missing telemetry schema URL |
| AL0014 | Warning | Use is null instead of == null |
| AL0015 | Info | Normalize null-guard style |
| AL0016 | Info | Combine declaration with null-check |
| AL0017 | Warning | Hardcoded version in Directory.Packages.props |
| AL0018 | Warning | Version.props not imported |
| AL0019 | Warning | Undefined version variable |
| AL0020-24 | Error | ASP.NET Core form binding issues |
| AL0025 | Warning | Prefer static lambda |
| AL0026 | Warning | Use TimeProvider instead of DateTime.Now |
| AL0027 | Warning | Use System.Text.Json instead of Newtonsoft |
| AL0028 | Info | Use IsEqualTo for symbol comparison |
| AL0029 | Info | Use HasAttribute extension |
| AL0030 | Info | Use Implements/InheritsFrom extensions |
| AL0031 | Info | Use IsMethodNamed/TryGetConstantValue |
| AL0032 | Info | Use OrEmpty() extension |
| AL0033 | Info | Use ToImmutableArrayOrEmpty() extension |
| AL0034 | Info | Use WhereNotNull() extension |
| AL0035 | Info | Use GetFullyQualifiedName/GetMetadataName |
| AL0036 | Warning | Use Guard.NotNull() instead of throw pattern |
| AL0037 | Warning | Use TryParseInt32() etc. extensions |
| AL0038 | Warning | Use GetOrNull()/GetOrDefault() extensions |
| AL0039 | Warning | Use EqualsIgnoreCase() etc. extensions |
| AL0040 | Warning | Use GetConstructorArgument<T>() extensions |
| AL0041 | Error | [AotTest]/[TrimTest] must return int |
| AL0042 | Warning | [AotTest]/[TrimTest] should return 100 |
| AL0043 | Warning | [TrimSafe] violates trim safety |
| AL0044 | Warning | [AotSafe] violates AOT safety |
Legend: Error = build error, Warning = build warning, Info = IDE only
Code Fixes
Automatic fixes available for: AL0002, AL0004, AL0005, AL0008, AL0010, AL0011, AL0012, AL0014, AL0015, AL0016, AL0025, AL0026, AL0027, AL0028, AL0029, AL0030, AL0031
Configuration
[*.cs]
dotnet_diagnostic.AL0001.severity = error
dotnet_diagnostic.AL0014.severity = none
Documentation
ancplua.mintlify.app/analyzers
Related
- ANcpLua.NET.Sdk - MSBuild SDK (auto-injects this analyzer)
- ANcpLua.Roslyn.Utilities - Roslyn helpers
License
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.Bcl.AsyncInterfaces (>= 6.0.0)
- System.Threading.Tasks.Extensions (>= 4.5.4)
-
net10.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.19.3 | 38 | 2/14/2026 |
| 1.19.1 | 60 | 2/14/2026 |
| 1.19.0 | 41 | 2/14/2026 |
| 1.18.0 | 68 | 2/14/2026 |
| 1.16.0 | 167 | 2/13/2026 |
| 1.15.0 | 47 | 2/13/2026 |
| 1.14.0 | 50 | 2/13/2026 |
| 1.13.0 | 132 | 2/5/2026 |
| 1.12.0 | 88 | 2/4/2026 |
| 1.10.7 | 211 | 1/28/2026 |
| 1.10.6 | 97 | 1/27/2026 |
| 1.10.5 | 128 | 1/27/2026 |
| 1.10.4 | 87 | 1/27/2026 |
| 1.10.3 | 92 | 1/25/2026 |
| 1.10.2 | 122 | 1/22/2026 |
| 1.10.0 | 94 | 1/21/2026 |
| 1.9.0 | 992 | 1/21/2026 |
| 1.8.0 | 92 | 1/21/2026 |
| 1.7.0 | 149 | 1/21/2026 |
| 1.6.16 | 127 | 1/21/2026 |