cargo-grip4rust 0.4.0

A cargo subcommand for measuring Rust testability
Documentation
# Copyright 2026 Umberto Gotti <umberto.gotti@umbertogotti.dev>
# Licensed under the MIT License
# SPDX-License-Identifier: MIT

$ErrorActionPreference = "Stop"
Push-Location (Split-Path $PSScriptRoot -Parent)

function Invoke-Step {
    param([string]$Label, [scriptblock]$Command)
    Write-Host "$Label..." -ForegroundColor Cyan
    & $Command
    if ($LASTEXITCODE -ne 0) {
        Write-Host "`nFailed: $Label (exit code $LASTEXITCODE)" -ForegroundColor Red
        Pop-Location
        exit 1
    }
}

# ---------------------------------------------------------------------------
# Self-analysis: grip on grip
# ---------------------------------------------------------------------------

Invoke-Step "cargo-grip self-analysis" {
    cargo run -- --json | Out-Null
}

Write-Host "`ngrip Stage 2 passed!" -ForegroundColor Green
Pop-Location
exit 0