Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
language: 'script'
pass_filenames: false
description: "Runs `golangci-lint`, requires https://github.com/golangci/golangci-lint"
- id: staticcheck
name: 'staticcheck'
entry: run-static-check.sh
files: '\.go$'
language: 'script'
description: "Runs `staticcheck`, requires https://honnef.co/go/tools/cmd/staticcheck"
- id: go-critic
name: 'go-critic'
entry: run-go-critic.sh
Expand Down
5 changes: 5 additions & 0 deletions run-static-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -e
for dir in $(echo $@|xargs -n1 dirname|sort -u); do
staticcheck $dir
done