Skip to content

Commit 30889a0

Browse files
committed
tests/provider: Recombine golangci-lint calls in Makefile lint target, add exclude-rules for unexpected SA1019 issues, replace deprecated deadline with timeout
Reference: #10236 Reference: golangci/golangci-lint#337 (comment)
1 parent 6e53219 commit 30889a0

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.golangci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
issues:
2+
exclude-rules:
3+
# Exclude issues bypassing staticcheck.conf
4+
- linters:
5+
- staticcheck
6+
text: "SA1019:"
27
max-per-linter: 0
38
max-same-issues: 0
49

@@ -11,8 +16,7 @@ linters:
1116
- gosimple
1217
- ineffassign
1318
- misspell
14-
# Run separately for TravisCI memory issues
15-
# - staticcheck
19+
- staticcheck
1620
- structcheck
1721
- unconvert
1822
- unused
@@ -24,5 +28,5 @@ linters-settings:
2428
ignore: github.com/hashicorp/terraform-plugin-sdk/helper/schema:ForceNew|Set,fmt:.*,io:Close
2529

2630
run:
27-
deadline: 5m
2831
modules-download-mode: vendor
32+
timeout: 5m

GNUmakefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ websitefmtcheck:
3636

3737
lint:
3838
@echo "==> Checking source code against linters..."
39-
@golangci-lint run --no-config --deadline 5m --disable-all --enable staticcheck --exclude SA1019 --max-issues-per-linter 0 --max-same-issues 0 ./$(PKG_NAME)/...
4039
@golangci-lint run ./$(PKG_NAME)/...
4140
@tfproviderlint \
4241
-c 1 \

0 commit comments

Comments
 (0)