Skip to content

Commit 352ae8c

Browse files
committed
CI: Use golangci-lint to run gofmt; remove redundant errcheck script
1 parent 2292b9e commit 352ae8c

File tree

5 files changed

+12
-48
lines changed

5 files changed

+12
-48
lines changed

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
matrix:
1010
go: [1.15, 1.16]
1111
os: [ubuntu-latest, macos-latest, windows-latest]
12-
make_target: [test, vet]
12+
make_target: [test]
1313

1414
steps:
1515
- name: Set up Go

.golangci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# https://golangci-lint.run/usage/configuration/
2+
13
linters-settings:
24
errcheck:
35
exclude: errcheck_excludes.txt
6+
7+
linters:
8+
enable:
9+
- gofmt
10+
- govet

GNUmakefile

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ endif
1010

1111
default: build
1212

13-
build: fmtcheck
13+
build:
1414
go install
1515

16-
test: fmtcheck
16+
test:
1717
go test -i $(TEST) || exit 1
1818
echo $(TEST) | \
1919
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4
@@ -25,7 +25,7 @@ testacc-up:
2525
testacc-down:
2626
docker-compose down
2727

28-
testacc: fmtcheck
28+
testacc:
2929
TF_ACC=1 GITLAB_TOKEN=$(GITLAB_TOKEN) GITLAB_BASE_URL=$(GITLAB_BASE_URL) go test -v $(TEST) $(TESTARGS) -timeout 40m
3030

3131
vet:
@@ -40,15 +40,9 @@ vet:
4040
fmt:
4141
gofmt -w $(GOFMT_FILES)
4242

43-
fmtcheck:
44-
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
45-
46-
errcheck:
47-
@sh -c "'$(CURDIR)/scripts/errcheck.sh'"
48-
4943
tfproviderlint:
5044
go run github.com/bflad/tfproviderlint/cmd/tfproviderlintx \
5145
-XAT001=false -XR003=false -XR005=false -XS001=false -XS002=false \
5246
./...
5347

54-
.PHONY: default build test testacc-up testacc-down testacc vet fmt fmtcheck errcheck tfproviderlint
48+
.PHONY: default build test testacc-up testacc-down testacc vet fmt tfproviderlint

scripts/errcheck.sh

Lines changed: 0 additions & 24 deletions
This file was deleted.

scripts/gofmtcheck.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)