mirror of
https://github.com/Oxalide/vsphere-influxdb-go.git
synced 2023-10-10 11:36:51 +00:00
add vendoring with go dep
This commit is contained in:
23
vendor/github.com/influxdata/influxdb/.hooks/pre-commit
generated
vendored
Executable file
23
vendor/github.com/influxdata/influxdb/.hooks/pre-commit
generated
vendored
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
fmtcount=`git ls-files | grep '.go$' | xargs gofmt -l 2>&1 | wc -l`
|
||||
if [ $fmtcount -gt 0 ]; then
|
||||
echo "Some files aren't formatted, please run 'go fmt ./...' to format your source code before committing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
vetcount=`go tool vet ./ 2>&1 | wc -l`
|
||||
if [ $vetcount -gt 0 ]; then
|
||||
echo "Some files aren't passing vet heuristics, please run 'go vet ./...' to see the errors it flags and correct your source code before committing"
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
|
||||
# Ensure FIXME lines are removed before commit.
|
||||
fixme_lines=$(git diff --cached | grep ^+ | grep -v pre-commit | grep FIXME | sed 's_^+\s*__g')
|
||||
if [ "$fixme_lines" != "" ]; then
|
||||
echo "Please remove the following lines:"
|
||||
echo -e "$fixme_lines"
|
||||
exit 1
|
||||
fi
|
||||
|
Reference in New Issue
Block a user