diff --git a/.gitignore b/.gitignore index 7537dda..2dc702d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ .DS_Store *.log +.cache diff --git a/tools/golangci-lint b/tools/golangci-lint new file mode 100755 index 0000000..4a77d20 --- /dev/null +++ b/tools/golangci-lint @@ -0,0 +1,14 @@ +#!/bin/sh + +# This script runs golangci-lint on the current directory via Docker. +# It exists solely to avoid having to install golangci-lint locally. +set -e + +image="golangci/golangci-lint:v1.56-alpine" + +exec docker run -t \ + --rm \ + --volume "$(pwd):/app" \ + --volume "$(pwd)/.cache/golangci-lint:/root/.cache" \ + --workdir /app \ + "$image" golangci-lint "$@"