IIMMPACT.CodeQuality 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package IIMMPACT.CodeQuality --version 0.1.0
                    
NuGet\Install-Package IIMMPACT.CodeQuality -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IIMMPACT.CodeQuality" Version="0.1.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IIMMPACT.CodeQuality" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="IIMMPACT.CodeQuality">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IIMMPACT.CodeQuality --version 0.1.0
                    
#r "nuget: IIMMPACT.CodeQuality, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IIMMPACT.CodeQuality@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IIMMPACT.CodeQuality&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=IIMMPACT.CodeQuality&version=0.1.0
                    
Install as a Cake Tool

iimmpact-dotnet-quality

IIMMPACT's shared C# code-quality rules: analyzer configuration shipped as a NuGet package, plus a dotnet tool that gates new violations on a per-file baseline.

Packages

Package What it is
IIMMPACT.CodeQuality Analyzer config package. References SonarAnalyzer.CSharp and Microsoft.CodeAnalysis.BannedApiAnalyzers and injects a .globalconfig, SonarLint.xml, CodeMetricsConfig.txt, and BannedSymbols.IIMMPACT.txt into the build. DevelopmentDependency, so it never flows to downstream consumers of your package.
IIMMPACT.CodeQuality.Tool dotnet tool iimmpact-quality with check and baseline commands. Builds the solution with SARIF logging enabled, collects diagnostics for the managed rules, and compares them against code-quality-baseline.json.

Managed rules

The package turns these rules on as warnings:

Rule Threshold Source of the limit
CA1502 cyclomatic complexity 25 CodeMetricsConfig.txt
CA1506 class/method coupling 60 (type), 40 (method) CodeMetricsConfig.txt
S134 nesting depth 4 SonarLint.xml
S138 method lines 60 SonarLint.xml
S104 file lines 400 SonarLint.xml
S4462 blocking async calls — globalconfig
CA1849, CA2016 async correctness — globalconfig
CA2254 logging template — globalconfig
RS0030 banned APIs DateTime.Now, DateTimeOffset.Now, System.Console, new HttpClient() BannedSymbols.IIMMPACT.txt
IDE0051, IDE0052, IDE0060 unused code non-public parameters globalconfig

Usage

Reference the package in every project you want checked:

<PackageReference Include="IIMMPACT.CodeQuality" Version="0.1.0" PrivateAssets="all" />

Install the tool once per repo:

dotnet tool install IIMMPACT.CodeQuality.Tool

Record existing debt, then gate:

dotnet iimmpact-quality baseline MyApp.slnx   # writes code-quality-baseline.json
dotnet iimmpact-quality check MyApp.slnx    # fails on growth or stale entries

check exits non-zero when:

  • a file gains diagnostics beyond what the baseline records (growth),
  • the baseline records more diagnostics than the build reports (stale), or
  • repo config silences a managed rule (dotnet_diagnostic.<id>.severity = none|silent|suggestion in .editorconfig/.globalconfig, or the rule in <NoWarn> in .props/.targets/.csproj).

How the tool works

iimmpact-quality runs dotnet sln list to find projects, deletes each project's obj/iimmpact-quality directory, rebuilds with -p:IimmpactQualitySarif=true, then parses the SARIF logs that IIMMPACT.CodeQuality.targets wires into ErrorLog. Diagnostics for rules outside the managed list are ignored, so unrelated analyzer noise never fails the gate.

Releasing

Tag v<version> where <version> equals the <Version> in Directory.Build.props. The release workflow verifies the tag, packs both packages, publishes to nuget.org via NuGet/login OIDC, and creates the GitHub release.

License

MIT — IIMMPACT SDN BHD.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.2.2 1,221 10/13/2026
0.2.1 572 10/6/2026
0.2.0 96 10/6/2026
0.1.0 117 10/1/2026