COMPILER & CI ENGINE • v0.1.0
Clippy CF Reporter
Translates `worker-rs` and Rust Clippy diagnostics into Code Climate JSON, SARIF v2.1.0, and GitHub Actions PR annotations.
ENGINEERING OVERVIEW
Engineered for Rust Cloudflare Workers (`worker-rs`), converting raw compiler JSON diagnostic streams into actionable CI/CD annotations and SAST compliance reports in milliseconds with zero external dependencies.
COMMAND LINE INTERFACE
GitHub Actions PR Annotations
Emits workflow commands (::warning, ::error) for inline pull request annotations.
cargo clippy --message-format=json | clippy-cf-reporter --format github
SARIF v2.1.0 for GitHub Code Scanning
Generates OASIS SARIF v2.1.0 reports for repository Security tabs.
cargo clippy --message-format=json | clippy-cf-reporter --format sarif --output clippy-results.sarif
Code Climate JSON for GitLab CI
Produces Code Climate spec output with SHA-256 fingerprint deduplication.
cargo clippy --message-format=json | clippy-cf-reporter --format codeclimate --output codeclimate.json
DIAGNOSTIC & AUDITING SPECIFICATIONS
| Rule ID | Category | Severity | Rule Description |
|---|---|---|---|
| WORKER-RS-LINT | Compiler | ERROR / WARN | Parses rustc/clippy json message envelopes and maps spans to repository relative files. |
| FILTER-CARGO-DEPS | Filter | INFO | Suppresses false positives originating inside ~/.cargo/registry and wasm-bindgen wrappers. |
| FINGERPRINT-HASH | Deduplication | INFO | Hashes line content, rule code, and file path to produce stable deduplication fingerprints. |
CI/CD WORKFLOW INTEGRATION
GitHub Actions Deployment Gate Example
Integrate directly into pull request checks to prevent misconfigurations and vulnerabilities from reaching production.
name: clippy-cf-reporter Audit
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install clippy-cf-reporter
run: cargo install --git https://github.com/bhubbard/clippy-cf-reporter
- name: Run CI Gate
run: clippy-cf-reporter --check