Files
llgo/.github/workflows/fmt.yml
2025-04-08 11:12:59 +08:00

31 lines
643 B
YAML

name: Format Check
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: ./.github/actions/setup-go
with:
go-version: "1.24.2"
- name: Check formatting
run: |
for dir in . runtime; do
pushd $dir
if [ -n "$(go fmt ./...)" ]; then
echo "Some files are not properly formatted. Please run 'go fmt ./...'"
exit 1
fi
popd
done
echo "All files are properly formatted."