Skip to content

Commit 56b3cb9

Browse files
authored
Fix golangci-lint config (#194)
Also, added local config verify to match github action errors when invalid config is detected.
1 parent d7eb383 commit 56b3cb9

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

.golangci.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ linters-settings:
2828
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
2929
lll:
3030
line-length: 250
31-
maligned:
32-
suggest-new: true
3331
nolintlint:
34-
allow-leading-space: false # disallow leading spaces. A space means the //nolint comment shows in `godoc` output.
3532
allow-unused: false # report any unused nolint directives
3633
require-explanation: false # do not require an explanation for nolint directives
3734
require-specific: true # require nolint directives to be specific about which linter is being skipped
@@ -106,10 +103,3 @@ issues:
106103
text: "unnecessaryDefer:"
107104
# Ignore static strings in tests
108105

109-
110-
# golangci.com configuration
111-
# https://github.com/golangci/golangci/wiki/Configuration
112-
service:
113-
golangci-lint-version: 1.64.x # use the fixed version to not introduce new linters unexpectedly
114-
prepare:
115-
- echo "here I can run custom commands, but no preparation needed for this repo"

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ golangci-lint:
132132
}
133133

134134
.PHONY: lint
135-
lint: golangci-lint ## Run golangci-lint linter & yamllint
136-
$(GOLANGCI_LINT) run --timeout 10m0s
135+
lint: golangci-lint ## Run all linters
136+
$(GOLANGCI_LINT) config verify && $(GOLANGCI_LINT) run --timeout 10m0s
137137
checkmake --config=.checkmake Makefile
138138
hadolint Dockerfile
139139
# shfmt -d *.sh script

0 commit comments

Comments
 (0)