gruff-rs 0.1.1

Rust static analyzer and quality linter for CI: dead-code, complexity, security, secrets, and architecture rules with deterministic SARIF/JSON output and baseline support.
# CI Integration

gruff-rs is designed to run as a deterministic CI quality gate.

## GitHub Actions

```yaml
name: gruff-rs

on: [push, pull_request]

jobs:
  analyse:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo run -- analyse src --format sarif --fail-on none > gruff-rs.sarif
      - uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: gruff-rs.sarif
```

## Quality Gate

For blocking jobs, choose the lowest severity that should fail the build:

```sh
cargo run -- analyse src --fail-on warning
```

Use `--fail-on none` when the job should only publish reports.

## Baselines

Generate an adoption baseline after reviewing current findings:

```sh
cargo run -- analyse src --generate-baseline --fail-on none
```

Future scans auto-apply `gruff-baseline.json` when present. Use
`--no-baseline` to audit the full unsuppressed result.

## Diff Scans

Rust keeps a safety-biased diff contract:

```sh
cargo run -- analyse src --diff-patch /tmp/gruff.patch --format json --fail-on none
cargo run -- analyse src --diff staged --diff-git-unsafe --fail-on warning
```

`--diff-git-unsafe` is required for Git-backed diff modes because they shell out
to Git. Prefer `--diff-patch` in locked-down CI environments.

## Preflight

Run the full local gate before releases:

```sh
scripts/preflight-checks.sh
```