From afa2dba89146e1ed8f5604dad5df0ec4c50c2ed3 Mon Sep 17 00:00:00 2001 From: Lucas Machado Date: Fri, 10 Jul 2026 18:46:51 +0200 Subject: [PATCH] ci: dogfood structlint and dupehound gates --- .gauntlet.yml | 12 ++++++++++++ .github/workflows/pr.yml | 14 ++++---------- README.md | 10 ++++++++++ 3 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 .gauntlet.yml diff --git a/.gauntlet.yml b/.gauntlet.yml new file mode 100644 index 0000000..b14231e --- /dev/null +++ b/.gauntlet.yml @@ -0,0 +1,12 @@ +custom_gates: + # Repository structure is a whole-run invariant and is never diff-suppressed. + structlint: + command: ["structlint", "validate", "--format", "github"] + parser: github-annotations + line_scoped: false + + # Duplication findings carry source locations and are scoped to changed lines. + dupehound: + command: ["dupehound", "scan", "--format", "github", "--quiet"] + parser: github-annotations + line_scoped: true diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 21bd9a0..6fd21d6 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -40,16 +40,6 @@ jobs: INCREMENTAL: false REVIEW_RULES: concise - validate: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: AxeForging/structlint@main - with: - config: .structlint.yaml - comment-on-pr: "true" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - gauntlet: runs-on: ubuntu-latest permissions: @@ -63,6 +53,10 @@ jobs: - uses: actions/setup-go@v5 with: go-version: "1.25" + - name: Install custom quality gates + run: | + go install github.com/AxeForging/structlint@v0.6.0 + go install github.com/AxeForging/dupehound@v0.1.0 # Dogfood: gauntlet runs gauntlet against its own PR diff. - uses: ./ with: diff --git a/README.md b/README.md index 9da2210..84344f0 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,16 @@ make test-integration # bin-driven scenarios in temp repos make build # bin/gauntlet with real ldflag build info ``` +Gauntlet dogfoods its own orchestration through `.gauntlet.yml`: Structlint runs as +a whole-repository structural invariant, while Dupehound annotations are scoped to the +PR diff. Install both released gates before reproducing CI locally: + +```bash +go install github.com/AxeForging/structlint@v0.6.0 +go install github.com/AxeForging/dupehound@v0.1.0 +gauntlet check --staged --format agent +``` + Spec: [docs/specs/001-gauntlet-core.md](docs/specs/001-gauntlet-core.md). Plan: [docs/specs/001-gauntlet-core.plan.md](docs/specs/001-gauntlet-core.plan.md). Roadmap: [ROADMAP.md](ROADMAP.md). ## License