Skip to main content

What are Checks?

Checks are automated validators that scan your project for common issues, misconfigurations, and best practice violations. Each check runs independently and reports its findings with actionable recommendations.

Available Checks

Dependencies

Scans for outdated npm packages and major version drift

Environment

Validates .env and .env.example synchronization

License

Ensures your project has a LICENSE file

Engine

Verifies Node.js version requirements

Circular

Detects circular dependency chains

Check Statuses

Every check returns one of four statuses:
Everything looks good. No action required.Example:
✅ license — LICENSE found (MIT)
Potential issues detected, but not critical. Consider addressing.Example:
⚠ deps — react is 2 major version(s) behind (you: ^16.0.0, latest: 18.3.1)
Critical issues found. Must be fixed.Example:
✗ circular — Found 3 circular dependency chain(s)
CI Impact: When any check fails, stackprobe audit exits with code 1, failing your CI pipeline.

How Checks Run

Checks execute sequentially during stackprobe audit. Each check:
  1. Analyzes relevant files in your project
  2. Validates against best practices and requirements
  3. Reports findings with severity levels (info/warn/error)
  4. Suggests fixes when possible
stackprobe audit
Check execution is fast — typically under 2 seconds for all checks combined.

Check Architecture

The check system is defined in /src/runner.ts:28-34:
const ALL_CHECKS: Record<string, () => Promise<CheckResult>> = {
  license: checkLicense,
  env: checkEnv,
  deps: checkDependencies,
  engine: checkEngine,
  circular: checkCircular,
};
Each check function returns a CheckResult object:
interface CheckResult {
  checkName: string;
  status: "pass" | "warn" | "fail" | "skip";
  messages: CheckMessage[];
  duration?: number; // execution time in ms
}

interface CheckMessage {
  level: "info" | "warn" | "error";
  text: string;
}

Running Specific Checks

You can run individual checks or filter them:
stackprobe audit --only deps

JSON Output

For CI integration, use JSON mode:
stackprobe audit --json
Output Example
{
  "results": [
    {
      "checkName": "deps",
      "status": "warn",
      "messages": [
        {
          "level": "warn",
          "text": "react is 2 major version(s) behind (you: ^16.0.0, latest: 18.3.1)"
        }
      ],
      "duration": 342
    }
  ],
  "duration": 1823
}

Error Handling

If a check crashes unexpectedly, it won’t break the entire audit:
  • The check reports as fail with an error message
  • Other checks continue to run
  • Full stack trace is logged for debugging
See /src/runner.ts:58-71 for implementation details.

Next Steps

Configure Checks

Customize which checks run in your project

CI Integration

Add StackProbe to your CI/CD pipeline

Build docs developers (and LLMs) love