Skip to content

Commit

Permalink
Update pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
adambabik committed Jun 22, 2024
1 parent b5583f1 commit bc7afcb
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
30 changes: 20 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,25 @@ repos:
- id: codespell
args: ["-L=ndoes,nd,clen"] # 2x words that are preceeded with "\n"; cLen
exclude: (package.*\.json$|go\.sum|pkg/api/gen)
- repo: https://github.com/TekWizely/pre-commit-golang
rev: v1.0.0-rc.1
- repo: local
hooks:
- id: go-fumpt
exclude: (^pkg/api/gen/.*$|^internal/client/graphql/query/generated.go$)
- id: go-build-mod
- id: go-mod-tidy
- id: go-revive-repo-mod
- id: go-staticcheck-mod
exclude: (^expect/.*$|^internal/client/graphql/query/generated.go$)
- id: go-sec-repo-mod
args: ["-exclude=G204,G304,G404", "-exclude-generated"]
name: go mod tidy
entry: go
args: ["mod", "tidy"]
language: system
types: [go]
pass_filenames: false
- id: lint
name: lint
entry: make
args: ["lint"]
language: system
types: [go]
pass_filenames: false
- id: build
name: build
entry: make
language: system
types: [go]
pass_filenames: false
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@ fmt:

.PHONY: lint
lint:
@revive -config revive.toml -formatter stylish -exclude integration/subject/... ./...
@gofumpt -d .
@revive \
-config revive.toml \
-formatter stylish \
-exclude integration/subject/... \
./...
@staticcheck ./...
@gosec -quiet -exclude=G204,G304,G404 -exclude-generated ./...

.PHONY: pre-commit
pre-commit: build wasm test lint
Expand Down

0 comments on commit bc7afcb

Please sign in to comment.