From a1ae2e77c280eb539616dda40ff8088716ba4616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Mon, 5 Oct 2026 12:37:22 -0400 Subject: [PATCH] CI: enforce 500-line file limit --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93a881a..440a800 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,11 @@ jobs: - name: Format if: runner.os == 'Linux' run: test -z "$(gofmt -l .)" || { gofmt -l .; exit 1; } + - name: File size limit + if: runner.os == 'Linux' + run: | + big=$(git ls-files '*.go' '*.html' | xargs wc -l | awk '$2!="total" && $1>500') + test -z "$big" || { echo "$big"; exit 1; } - name: Build and vet every platform if: runner.os == 'Linux' run: |