ntfy/.pre-commit-config.yaml
Nick Farrell b218e62ffc
Actually apply the pre-commit fixers to the codebase.
This can be redone manually with
`pre-commit run --all`

While the pre-commit hook could be merged to run locally,
it is much cleaner to align all the files to best-practice
syntax in a single commit. It is also required for server-side
validation.
2022-12-23 08:15:51 +11:00

26 lines
811 B
YAML

repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.0-alpha.4"
hooks:
- id: prettier
exclude_types: [markdown]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
stages: ["commit"]
- id: trailing-whitespace
stages: ["commit"]
- repo: https://github.com/Bahjat/pre-commit-golang
rev: v1.0.3
hooks:
- id: go-fmt-import
- id: go-vet
- id: go-lint
- id: go-unit-tests
stages: ["push"]
- id: golangci-lint # requires github.com/golangci/golangci-lint
args: [--config=.github/linters/.golangci.yml] # optional
- id: go-ruleguard # requires https://github.com/quasilyte/go-ruleguard
args: [rules/rules.go] # required