Skip to content

Instantly share code, notes, and snippets.

@rafaelsq
Last active October 9, 2019 11:54
Show Gist options
  • Save rafaelsq/c2a5e67f429044986e9b9c1fe22e8a4b to your computer and use it in GitHub Desktop.
Save rafaelsq/c2a5e67f429044986e9b9c1fe22e8a4b to your computer and use it in GitHub Desktop.
golangic-lint modified Go files
#!/bin/sh
git diff --name-status --no-renames ss/development | ag -v vendor | ag -v "\.qtpl" | ag -v "/gqlgen.go" | ag -v "^D" | cut -f2 | ag "\.go$" | xargs -r dirname | sort | uniq | xargs -r golangci-lint run --config ${PWD}/.golangci.yml
@rafaelsq
Copy link
Author

rafaelsq commented Sep 20, 2019

curl https://gist.githubusercontent.com/rafaelsq/c2a5e67f429044986e9b9c1fe22e8a4b/raw/4ade2879e86f43897cc4f432740e1cf9fffc598d/pre-push -o .git/hooks/pre-push && chmod +x .git/hooks/pre-push

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment