diff --git a/.githooks/pre-commit b/.githooks/pre-commit deleted file mode 100755 index 242159f04a..0000000000 --- a/.githooks/pre-commit +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# Copyright 2012 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. - -# git gofmt pre-commit hook -# -# To use, store as .git/hooks/pre-commit inside your repository and make sure -# it has execute permissions. -# -# This script does not handle file names that contain spaces. - -gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\.go$') -[ -z "$gofiles" ] && exit 0 - -unformatted=$(gofmt -l $gofiles) -[ -z "$unformatted" ] && exit 0 - -# Some files are not gofmt'd. Print message and fail. - -echo >&2 "Go files must be formatted with gofmt. Please run:" -for fn in $unformatted; do - echo >&2 " gofmt -w $PWD/$fn" -done - -exit 1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7faaf4b309..8702262623 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -243,15 +243,6 @@ so keep your customizations in `.envrc`. [direnv_link]: https://direnv.net/ [source_env]: https://direnv.net/man/direnv-stdlib.1.html#codesourceenv-ltfileordirpathgtcode -## Git hooks - -We have checked in a pre-commit hook which enforces `go fmt` styling. Please install it -before sending a pull request. From the project root: - -```shell -$ ln -s .githooks/pre-commit .git/hooks/pre-commit -``` - ## Reporting security vulnerabilities If you've found a vulnerability or a potential vulnerability in SPIRE please let us know at . We'll send a confirmation email to acknowledge your report, and we'll send an additional email when we've identified the issue positively or negatively.