A GitHub Action that enforces consistent formatting across your CI pipeline.
fmtcheck runs your language's canonical formatter in check mode and fails the build on any diff. Formatting debates stay out of code review because the machine settles them in CI.
- uses: libnudget/fmtcheck@mainChecks the repository root. To check a subdirectory:
- uses: libnudget/fmtcheck@main
with:
path: src- Go source files (
*.go) must matchgofmtoutput. .gitandvendordirectories are skipped.
| Name | Required | Default | Description |
|---|---|---|---|
path |
no | . |
Directory to check. |
The check can be run without Docker:
go run . --path .go vet ./...
go test ./...
gofmt -l .MIT