Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .golangci.bck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# See https://github.com/golangci/golangci-lint#config-file
run:
issues-exit-code: 1 #Default
tests: true #Default

linters:
disable:
- misspell
- errcheck
- goimports
- gofmt

# Commented out in 1.18 b/c generics, to restore when functional
# Note the two exclusions below still apply when this is restored.
# - revive

issues:
exclude-rules:
# helpers in tests often (rightfully) pass a *testing.T as their first argument
- path: _test\.go
text: "context.Context should be the first parameter of a function"
linters:
- revive
# Yes, they are, but it's okay in a test
- path: _test\.go
text: "exported func.*returns unexported type.*which can be annoying to use"
linters:
- revive

linters-settings:
misspell:
locale: US
ignore-words:
- cancelled
67 changes: 36 additions & 31 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
# See https://github.com/golangci/golangci-lint#config-file
version: "2"
run:
issues-exit-code: 1 #Default
tests: true #Default

issues-exit-code: 1
tests: true
linters:
enable:
disable:
- misspell
- errcheck
- goimports
- gofmt

# Commented out in 1.18 b/c generics, to restore when functional
# Note the two exclusions below still apply when this is restored.
# - revive

issues:
exclude-rules:
# helpers in tests often (rightfully) pass a *testing.T as their first argument
- path: _test\.go
text: "context.Context should be the first parameter of a function"
linters:
- revive
# Yes, they are, but it's okay in a test
- path: _test\.go
text: "exported func.*returns unexported type.*which can be annoying to use"
linters:
- revive

linters-settings:
misspell:
locale: US
ignore-words:
- cancelled
- misspell
settings:
misspell:
locale: US
ignore-rules:
- cancelled
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- revive
path: _test\.go
text: context.Context should be the first parameter of a function
- linters:
- revive
path: _test\.go
text: exported func.*returns unexported type.*which can be annoying to use
paths:
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ TOOLS_DIR := $(abspath ./.tools)

$(TOOLS_DIR)/golangci-lint: $(TOOLS_MOD_DIR)/tools.go
cd $(TOOLS_MOD_DIR) && \
go build -o $(TOOLS_DIR)/golangci-lint github.com/golangci/golangci-lint/cmd/golangci-lint
go build -o $(TOOLS_DIR)/golangci-lint github.com/golangci/golangci-lint/v2/cmd/golangci-lint

$(TOOLS_DIR)/misspell: $(TOOLS_MOD_DIR)/tools.go
cd $(TOOLS_MOD_DIR) && \
Expand Down
Loading