mirror of
https://github.com/miniflux/v2.git
synced 2025-07-02 16:38:37 +00:00
First commit
This commit is contained in:
commit
8ffb773f43
2121 changed files with 1118910 additions and 0 deletions
52
vendor/github.com/PuerkitoBio/goquery/misc/git/pre-commit
generated
vendored
Executable file
52
vendor/github.com/PuerkitoBio/goquery/misc/git/pre-commit
generated
vendored
Executable file
|
@ -0,0 +1,52 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo ">>> golint"
|
||||
for dir in $(go list ./... | grep -v /vendor/)
|
||||
do
|
||||
golint "${dir}"
|
||||
done
|
||||
echo "<<< golint"
|
||||
echo
|
||||
|
||||
echo ">>> go vet"
|
||||
go vet $(go list ./... | grep -v /vendor/)
|
||||
echo "<<< go vet"
|
||||
echo
|
||||
|
||||
echo ">>> gosimple"
|
||||
gosimple $(go list ./... | grep -v /vendor/)
|
||||
echo "<<< gosimple"
|
||||
echo
|
||||
|
||||
echo ">>> staticcheck"
|
||||
staticcheck $(go list ./... | grep -v /vendor/)
|
||||
echo "<<< staticcheck"
|
||||
echo
|
||||
|
||||
echo ">>> unused"
|
||||
unused $(go list ./... | grep -v /vendor/)
|
||||
echo "<<< unused"
|
||||
echo
|
||||
|
||||
echo ">>> gas"
|
||||
gas $(find . -name "*.go" | grep -v /vendor/ | grep -v '_test.go$')
|
||||
echo "<<< gas"
|
||||
echo
|
||||
|
||||
# Check for gofmt problems and report if any.
|
||||
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '.go$' | grep -v /vendor/)
|
||||
[ -z "$gofiles" ] && echo "EXIT $vetres" && exit $vetres
|
||||
|
||||
if [ -n "$gofiles" ]; then
|
||||
unformatted=$(gofmt -l $gofiles)
|
||||
|
||||
if [ -n "$unformatted" ]; then
|
||||
# Some files are not gofmt'd.
|
||||
echo >&2 "Go files must be formatted with gofmt. Please run:"
|
||||
for fn in $unformatted; do
|
||||
echo >&2 " gofmt -w $PWD/$fn"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
echo
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue