Skip to content

Commit

Permalink
build: add tools/golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
robertrossmann committed Feb 20, 2024
1 parent 7af36a8 commit 2871b24
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
.DS_Store

*.log
.cache
14 changes: 14 additions & 0 deletions tools/golangci-lint
Original file line number Diff line number Diff line change
@@ -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 "$@"

0 comments on commit 2871b24

Please sign in to comment.