Skip to content

Commit 6495fd7

Browse files
authored
chore: switch from golint to golangci-lint (#465)
* chore: switch from golint to golangci-lint Signed-off-by: Todd Ekenstam <[email protected]> * fix: update golangci-lint action to fix CI build Signed-off-by: Todd Ekenstam <[email protected]> --------- Signed-off-by: Todd Ekenstam <[email protected]>
1 parent a3d330a commit 6495fd7

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/workflows/unit-test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ jobs:
2020
- name: Check out code into the Go module directory
2121
uses: actions/checkout@v4
2222

23+
- name: Run golangci-lint
24+
uses: golangci/golangci-lint-action@v3
25+
with:
26+
version: v1.55.2
27+
only-new-issues: true
28+
args: --timeout=3m
29+
2330
- name: Initialize CodeQL
2431
uses: github/codeql-action/init@v3
2532
with:

.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
linters:
3+
enable:
4+
- govet
5+
- gosimple
6+
- ineffassign

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,8 @@ endif
125125

126126
.PHONY: lint
127127
lint: check-go
128-
@echo "golint $(LINTARGS)"
129-
@for pkg in $(shell go list ./...) ; do \
130-
golint $(LINTARGS) $$pkg ; \
131-
done
128+
@echo "Running golangci-lint"
129+
golangci-lint run ./... || echo "Linting errors found - these will be enforced in the future"
132130

133131
.PHONY: clean
134132
clean:

0 commit comments

Comments
 (0)