ArchLinterNet.Testing
0.6.2
See the version list below for details.
dotnet add package ArchLinterNet.Testing --version 0.6.2
NuGet\Install-Package ArchLinterNet.Testing -Version 0.6.2
<PackageReference Include="ArchLinterNet.Testing" Version="0.6.2" />
<PackageVersion Include="ArchLinterNet.Testing" Version="0.6.2" />
<PackageReference Include="ArchLinterNet.Testing" />
paket add ArchLinterNet.Testing --version 0.6.2
#r "nuget: ArchLinterNet.Testing, 0.6.2"
#:package ArchLinterNet.Testing@0.6.2
#addin nuget:?package=ArchLinterNet.Testing&version=0.6.2
#tool nuget:?package=ArchLinterNet.Testing&version=0.6.2
<p align="center"> <img src="docs/assets/logo.png" alt="ArchLinterNet" width="420"> </p>
<p align="center"> <a href="https://www.nuget.org/packages/ArchLinterNet.Cli/"><img alt="NuGet version" src="https://img.shields.io/nuget/v/ArchLinterNet.Cli.svg"></a> <a href="https://www.nuget.org/packages/ArchLinterNet.Cli/"><img alt="NuGet downloads" src="https://img.shields.io/nuget/dt/ArchLinterNet.Cli"></a> <a href="https://github.com/eugenemalaschuk-source/arch-linter-net/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/eugenemalaschuk-source/arch-linter-net/actions/workflows/ci.yml/badge.svg"></a> <a href="https://app.codecov.io/github/eugenemalaschuk-source/arch-linter-net"><img alt="Test coverage" src="https://codecov.io/github/eugenemalaschuk-source/arch-linter-net/graph/badge.svg"></a> <a href="https://eugenemalaschuk-source.github.io/arch-linter-net/"><img alt="Documentation" src="https://img.shields.io/badge/docs-GitHub%20Pages-blue"></a> <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-blue.svg"></a> </p>
YAML-first architecture governance for .NET repositories.
ArchLinterNet turns architectural decisions into executable contracts: layered boundaries, protected internal APIs, dependency policies, baseline-aware adoption, architecture coverage, and CI-ready diagnostics. It helps teams catch architecture drift in pull requests before it becomes hidden design debt.
The goal is not just to lint dependencies. ArchLinterNet makes architecture rules explicit, reviewable, enforceable, and safe to evolve as a normal part of development.
Status: 0.6.1 is the public adoption package line. It ships an
adoption-stabilization/v1schema registry whose entries version persisted contracts independently from package SemVer: most stay at their frozen immutable0.5.1identity, while policy-root/policy-fragment have advanced to0.6.1to support newer policy syntax. Checkpoint A is internal evidence only; the packed-artifact Checkpoint B is the release authorization gate. Usearch-linter-net schema listfrom the installed package to discover the current offline$schemaidentities.
Why ArchLinterNet?
Architecture rules often start as diagrams, ADRs, review comments, handwritten test helpers, or tribal knowledge. That works for a while, but the rules quickly become hard to discover, hard to reuse across repositories, and hard for humans or AI agents to review consistently.
ArchLinterNet uses a repository-owned YAML policy file as the source of truth:
architecture/arch.yml (recommended; any selected filename works)
↓
ArchLinterNet CLI / test adapter
↓
strict or audit architecture validation
↓
human diagnostics + CI artifacts
Use it when you want architecture rules to be declarative, reviewable, CI-friendly, and independent from one-off test code.
Quick start
Create a root policy. This quick start uses the recommended concise path
architecture/arch.yml; the filename is configurable and has no runtime
semantics:
version: 1
name: Example Architecture Contract
layers:
application:
namespace: MyApp.Application
domain:
namespace: MyApp.Domain
infrastructure:
namespace: MyApp.Infrastructure
analysis:
target_assemblies:
- MyApp.Application
- MyApp.Domain
- MyApp.Infrastructure
contracts:
strict:
- id: application-not-infrastructure
name: application-must-not-depend-on-infrastructure
source: application
forbidden: [infrastructure]
reason: Application code must depend on abstractions, not concrete infrastructure.
strict_layers:
- id: clean-architecture-layering
name: clean-architecture-layering
layers: [infrastructure, application, domain]
reason: Dependencies must point inward toward the domain.
Run from this repository during development:
dotnet run --project src/ArchLinterNet.Cli -- --policy architecture/arch.yml --mode strict
After installing the .NET tool from NuGet.org:
arch-linter-net --policy architecture/arch.yml --mode strict
Main capabilities
ArchLinterNet focuses on static architecture guardrails:
- YAML policy loading, deterministic local fragments, and schema-backed root/fragment authoring.
- Namespace/layer dependency contracts and allow-only contracts.
- Ordered layer contracts and reusable layer templates.
- Dependency cycle, acyclic sibling, independence, and assembly independence checks.
- Directional assembly dependency and assembly allow-only checks.
- Protected surface contracts for importer restrictions.
- External dependency leakage checks and external allow-only whitelist checks for vendor/framework namespaces.
- Method-body forbidden API checks.
- Unity
.asmdefdependency validation. - Coverage contracts for unmapped first-party namespaces, projects, and assemblies.
- Project/solution discovery when assemblies are not hand-listed.
- Policy-consistency diagnostics for contradictory or unreachable policy definitions.
- Strict gates, audit diagnostics, JSON output, timings, and migration baselines.
- CEL-backed
whenpredicates narrowing selectors on a closed set of locations — standard CEL under a safe, documented profile, not a proprietary DSL.
ArchLinterNet does not validate runtime dependency injection behavior, authorization/security correctness, code ownership, semantic data flow, or arbitrary custom YAML fields outside the documented schema.
Documentation
Public product documentation is published through MkDocs and GitHub Pages:
- Documentation home
- Getting started
- Installation
- CLI usage
- Policy format
- Policy imports
- CEL policy expressions
- Contract families
- Coverage contracts
- CI integration
- Adopt or upgrade to 0.5.1
- 0.5.1 reference entrypoints
- AI policy authoring
- Supported capabilities and non-goals
Internal project documentation remains in repository Markdown files such as docs/internal/, openspec/, .github/, and root governance files. It is not part of the published product site.
Local documentation workflow
make venv # create Python virtual environment
make docs-serve # preview MkDocs locally
make docs-build # build the static documentation site
make fmt-docs # auto-format markdown documentation
make lint-docs # strict documentation validation
Generated site/ output is a build artifact and should not be committed.
Project health and assurance
<details> <summary>Security, maintainability, and supply-chain status</summary>
<p> <a href="https://github.com/eugenemalaschuk-source/arch-linter-net/actions/workflows/codeql.yml"><img alt="CodeQL" src="https://github.com/eugenemalaschuk-source/arch-linter-net/actions/workflows/codeql.yml/badge.svg"></a> <a href="https://scorecard.dev/viewer/?uri=github.com/eugenemalaschuk-source/arch-linter-net"><img alt="OpenSSF Scorecard" src="https://api.scorecard.dev/projects/github.com/eugenemalaschuk-source/arch-linter-net/badge"></a> <a href="https://www.bestpractices.dev/en/projects/13572/passing"><img alt="OpenSSF Best Practices" src="https://www.bestpractices.dev/projects/13572/badge"></a> <a href="https://sonarcloud.io/summary/overall?id=eugenemalaschuk-source_arch-linter-net&branch=main"><img alt="Sonar Quality Gate" src="https://sonarcloud.io/api/project_badges/measure?project=eugenemalaschuk-source_arch-linter-net&metric=alert_status&branch=main"></a> <a href="https://sonarcloud.io/summary/overall?id=eugenemalaschuk-source_arch-linter-net&branch=main"><img alt="Sonar Maintainability" src="https://sonarcloud.io/api/project_badges/measure?project=eugenemalaschuk-source_arch-linter-net&metric=sqale_rating&branch=main"></a> <a href="https://sonarcloud.io/summary/overall?id=eugenemalaschuk-source_arch-linter-net&branch=main"><img alt="Sonar Reliability" src="https://sonarcloud.io/api/project_badges/measure?project=eugenemalaschuk-source_arch-linter-net&metric=reliability_rating&branch=main"></a> <a href="https://sonarcloud.io/summary/overall?id=eugenemalaschuk-source_arch-linter-net&branch=main"><img alt="Sonar Security" src="https://sonarcloud.io/api/project_badges/measure?project=eugenemalaschuk-source_arch-linter-net&metric=security_rating&branch=main"></a> </p>
The CI badge tracks one workflow that runs all quality signals in the same validate job, so a green badge means all of them passed. SonarCloud also analyzes trusted pull requests, decorates the PR, and evaluates the quality gate on new code rather than forcing the entire historical codebase to be clean before the PR can merge:
| Quality signal | Source |
|---|---|
| Build/test | make acceptance (lint + all tests) |
| Test coverage (line %) | CI runs make test-coverage, uploads Cobertura XML to Codecov, and the primary coverage badge updates dynamically from Codecov |
| SonarCloud PR quality gate | trusted pull_request runs analyze new code, publish a SonarCloud PR result link, and fail CI when the Sonar quality gate fails |
| SonarCloud main quality signals | the Sonar badges track the main branch project status for quality gate, maintainability, reliability, and security |
| OpenSSF Scorecard | trusted pull requests produce reviewable SARIF; default-branch and scheduled runs publish the supply-chain score to the public Scorecard API and GitHub code scanning |
| Architecture validation | strict ArchLinterNet self-policy check (architecture/dependencies.arch.yml) |
| Architecture coverage | strict/audit coverage JSON artifacts + Markdown report + sticky PR comment |
See CI integration for how test coverage upload, SonarCloud PR analysis, the dynamic badge, and the architecture coverage gate fit together.
</details>
NuGet and repository links
NuGet packages should expose only public user-facing links:
- project/documentation URL: the GitHub Pages MkDocs site;
- repository URL: this GitHub repository;
- package README: this concise product README;
- license: repository license expression.
NuGet metadata must not point users to internal backlog governance, OpenSpec archives, or maintenance-agent instructions as product documentation.
Security
Report suspected vulnerabilities privately through GitHub Private Vulnerability Reporting. Do not disclose unresolved vulnerabilities in public issues, pull requests, or discussions. See the security policy for supported preview releases, reporting guidance, and disclosure expectations.
License
MIT.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- ArchLinterNet.Core (>= 0.6.2)
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.9.1 | 59 | 9/28/2026 |
| 0.9.0 | 42 | 9/28/2026 |
| 0.9.0-preview.1 | 248 | 9/22/2026 |
| 0.8.2 | 244 | 9/19/2026 |
| 0.8.1 | 86 | 9/19/2026 |
| 0.8.0 | 429 | 9/5/2026 |
| 0.7.4 | 104 | 8/28/2026 |
| 0.7.3 | 98 | 8/27/2026 |
| 0.7.2 | 95 | 8/27/2026 |
| 0.7.1 | 109 | 8/26/2026 |
| 0.7.0 | 181 | 8/23/2026 |
| 0.6.5 | 111 | 8/15/2026 |
| 0.6.4 | 142 | 8/13/2026 |
| 0.6.3 | 100 | 8/12/2026 |
| 0.6.2 | 101 | 8/12/2026 |
| 0.6.1 | 99 | 8/10/2026 |
| 0.6.0 | 118 | 8/6/2026 |
| 0.5.0 | 116 | 7/19/2026 |
| 0.4.2 | 115 | 7/10/2026 |
| 0.4.1 | 114 | 7/10/2026 |
See GitHub release notes for v0.6.2.