summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRadek Simko <radek.simko@gmail.com>2024-02-16 14:13:46 +0000
committerRadek Simko <radek.simko@gmail.com>2024-02-16 15:26:29 +0000
commit3cf75729d009ca16bbefb909f66e0807c4d8d19a (patch)
tree919fe2fe6109102e0eb22cee333d2a3ab8035092 /scripts
parenta7f9ab5f338cecf99d46b98dc43450d1fcb96373 (diff)
Add make targets for common checks + fixes
This is to make it easier for existing and new maintainers and contributors to run checks on the codebase.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gofmtcheck.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/gofmtcheck.sh b/scripts/gofmtcheck.sh
new file mode 100755
index 0000000..c09fa20
--- /dev/null
+++ b/scripts/gofmtcheck.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+# Copyright (c) HashiCorp, Inc.
+# SPDX-License-Identifier: MPL-2.0
+
+if [[ -n $(gofmt -l ./) ]]; then echo "Please run gofmt -w ./ to format code"; exit 1; fi;