ANcpLua.Analyzers
1.13.0
dotnet add package ANcpLua.Analyzers --version 1.13.0
NuGet\Install-Package ANcpLua.Analyzers -Version 1.13.0
<PackageReference Include="ANcpLua.Analyzers" Version="1.13.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
<PackageVersion Include="ANcpLua.Analyzers" Version="1.13.0" />
<PackageReference Include="ANcpLua.Analyzers"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add ANcpLua.Analyzers --version 1.13.0
#r "nuget: ANcpLua.Analyzers, 1.13.0"
#:package ANcpLua.Analyzers@1.13.0
#addin nuget:?package=ANcpLua.Analyzers&version=1.13.0
#tool nuget:?package=ANcpLua.Analyzers&version=1.13.0
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.13.0 | 76 | 2/5/2026 |
| 1.12.0 | 63 | 2/4/2026 |
| 1.10.7 | 170 | 1/28/2026 |
| 1.10.6 | 93 | 1/27/2026 |
| 1.10.5 | 124 | 1/27/2026 |
| 1.10.4 | 83 | 1/27/2026 |
| 1.10.3 | 90 | 1/25/2026 |
| 1.10.2 | 119 | 1/22/2026 |
| 1.10.0 | 91 | 1/21/2026 |
| 1.9.0 | 856 | 1/21/2026 |
| 1.8.0 | 89 | 1/21/2026 |
| 1.7.0 | 147 | 1/21/2026 |
| 1.6.16 | 124 | 1/21/2026 |
| 1.6.15 | 100 | 1/20/2026 |
| 1.6.13 | 404 | 1/18/2026 |
| 1.6.12 | 98 | 1/18/2026 |
| 1.6.11 | 106 | 1/18/2026 |
| 1.6.10 | 100 | 1/17/2026 |
| 1.6.7 | 95 | 1/16/2026 |
| 1.6.6 | 132 | 1/14/2026 |
| 1.6.5 | 105 | 1/14/2026 |
| 1.6.4 | 90 | 1/14/2026 |
| 1.6.3 | 92 | 1/14/2026 |
| 1.6.2 | 94 | 1/14/2026 |
| 1.6.1 | 364 | 1/14/2026 |
| 1.6.0 | 108 | 1/13/2026 |
| 1.5.3 | 133 | 1/10/2026 |
| 1.5.2 | 92 | 1/10/2026 |
| 1.5.1 | 281 | 1/2/2026 |
| 1.5.0 | 90 | 1/2/2026 |
| 1.4.0 | 93 | 1/1/2026 |
| 1.3.6 | 93 | 1/2/2026 |
| 1.3.5 | 94 | 1/2/2026 |
| 1.3.3 | 98 | 12/31/2025 |
| 1.3.2 | 95 | 12/31/2025 |
| 1.3.1 | 94 | 12/30/2025 |
| 1.0.10 | 100 | 12/30/2025 |
| 1.0.9 | 98 | 12/29/2025 |
| 1.0.4 | 862 | 12/24/2025 |
| 1.0.3 | 171 | 12/24/2025 |
| 1.0.2 | 169 | 12/24/2025 |