From a49e0cd2c4013cbdcf318d95f77d4cbff7b26864 Mon Sep 17 00:00:00 2001 From: Zach Kipp Date: Thu, 23 Apr 2026 21:00:38 +0000 Subject: [PATCH] ci: fail Lint gen on newly created files 'git diff --exit-code' only inspects tracked files, so when 'make gen' produces new Markdown (e.g. for a new resource or data source), the check passes while the generated file remains uncommitted. Switch the check to 'git status --porcelain' so both modifications and untracked output fail the step, and print the offending paths and diff for easier debugging. Generated by Coder Agents on behalf of @zedkipp. --- .github/workflows/test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb45b4b8..cc36ff29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -158,4 +158,9 @@ jobs: - name: Lint gen run: | make gen - git diff --exit-code + if [ -n "$(git status --porcelain)" ]; then + echo "make gen produced changes; run 'make gen' locally and commit the result:" + git status --porcelain + git --no-pager diff + exit 1 + fi