Skip to content

Commit

Permalink
fix: [#100] Prevent code duplication by using a Taskfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sbp-bvanb committed Oct 28, 2024
1 parent e71eb4b commit 39ced35
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
version: "3"

vars:
GOLANGCI_LINT_VERSION: 1.61.0

tasks:
golangci-lint-install:
silent: true
cmds:
- |
if ! golangci-lint --version | grep -q "has version {{.GOLANGCI_LINT_VERSION}}"; then
curl \
-sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh |\
sh -s -- -b $(go env GOPATH)/bin v{{.GOLANGCI_LINT_VERSION}}
fi
golangci-lint-run:
silent: true
cmds:
- |
golangci-lint run \
-v
lint:
silent: true
cmds:
- task: golangci-lint-install
- task: golangci-lint-run
lint-without-cache:
silent: true
cmds:
- task: golangci-lint-install
- golangci-lint cache clean
- task: golangci-lint-run

0 comments on commit 39ced35

Please sign in to comment.