Skip to content
CAI
Software that uses CAICheck a score

ardalis/GuardClauses

66.0

Adequate · 8 November 2026

3.1k

lines of production code

C#

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added NotFoundException for missing queried objects

A new NotFoundException class has been introduced to represent errors when a queried object is not found. This exception accepts the object name and query key, providing a descriptive message, and supports an inner exception for chaining.

src/GuardClauses/Exceptions · high confidence

Added application logo assets

The media directory now includes a new logo asset, provided as an Adobe Illustrator file (logotype 1024.ai) and multiple SVG variants (48, 72, 96, 144, 256, 512, and logotype 1024). These files, generated from CorelDRAW X7, supply the visual branding assets for the application.

media · high confidence

Initial project structure and documentation

This change introduces the foundational structure for the Ardalis.GuardClauses library, including the solution file, project configuration (Directory.Build.props), and an .editorconfig enforcing .NET coding conventions. It also adds essential documentation files such as README.md, CONTRIBUTING.md, and CODE\_OF\_CONDUCT.md, along with build artifacts like the Azure Pipelines backup and NuGet publishing instructions.

(repo-wide) · high confidence

Behavioural changes

Guard clauses now support custom exceptions and automatic parameter names

The guard clause extension methods in src/GuardClauses have been updated to accept an optional Func\<Exception\> exceptionCreator parameter, allowing users to supply custom exception types instead of the default ArgumentException or ArgumentNullException. Additionally, the methods now use the CallerArgumentExpression attribute to automatically capture the parameter name from the call site, removing the need for manual string arguments and reducing boilerplate. Deprecated methods like AgainstExpression have been marked obsolete in favor of the new Expression methods which use reversed validation logic.

src/GuardClauses · high confidence

Incorporates JetBrains.Annotations source code with internal modifiers

The project now includes the JetBrains.Annotations source file directly within the codebase, with all attribute classes modified to be internal and sealed. This change embeds the nullability and annotation attributes locally, ensuring that IDE tooling and static analysis features (such as null-reference warnings) function correctly without requiring an external NuGet package dependency.

src/GuardClauses/ThirdParty · high confidence

Test coverage

Added unit tests for custom guard extensions; Expanded unit test coverage for guard clauses.

Dependencies

Ardalis.GuardClauses 5.0 targets .NET 8 and updates test infrastructure

The library has been updated to version 5.0.0 and now targets .NET 8.0 alongside .NET Standard 2.0 and 2.1. The project file includes an icon and a README file in the NuGet package, and explicitly sets the MIT license. The test project has been upgraded to .NET 8.0 and updated to use the latest versions of xUnit (2.9.3), Microsoft.NET.Test.Sdk (18.9.0), and coverage tools (altcover 9.0.102, coverlet 10.0.1).

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 65 → 66 (+1.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 90 → 90 (+0.0)
  • Architecture 100 → 100 (+0.0)
  • Maturity 53 → 58 (+4.9)
  • Readiness 74 → 74 (-0.1)
  • Security 73 → 66 (-6.8)
  • Performance 72 → 77 (+5.1)

Resolved (3)

  • Documentation: no project overview (README.md)
  • Low XML-doc coverage: GuardClauses(net8.0) (src/GuardClauses/GuardClauses.csproj)
  • Off-boarding risk: anonymized user #1

New (2)

  • Off-boarding risk: anonymized user #1
  • Outdated: ReportGenerator

Changes since last survey

  • 1 commits — 1 feature/other, 0 fixes

By area

  • (root) — 1 commit

Notable commits

  • change: docs: update README to announce transition to commercial license

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

ardalis/GuardClauses was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 8 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 61dde6c9d3e1715286bd100144a9edff1ad0664c — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.3+preprod-45ab2cab63de.