Files
HackBrowserData/.github/workflows/lint.yml
T
Roger f4c05f861f chore: add refactor RFCs and compatibility guardrails (#648)
Phase 0 of the refactor: settle the design record and pin the CLI flag
surface and wire names before any code moves.
2026-10-26 15:41:47 +08:00

44 lines
1.1 KiB
YAML

name: Lint
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
name: Lint (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: '1.20.x'
- name: Check Go version constraint
if: matrix.os == 'ubuntu-latest'
run: |
GO_VERSION=$(grep '^go ' go.mod | awk '{print $2}')
if [ "$GO_VERSION" != "1.20" ]; then
echo "::error::go.mod directive must remain 'go 1.20' (Windows 7 support requirement)"
echo "::error::Current value: go $GO_VERSION"
exit 1
fi
if grep -q '^toolchain' go.mod; then
echo "::error::go.mod must not carry a toolchain line (keeps the module on Go 1.20)"
exit 1
fi
- name: golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.10