Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

golangci-lint: more config cleanup #1142

Merged
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
100 changes: 72 additions & 28 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,54 @@ linters-settings:
wsl:
allow-trailing-comment: true
enforce-err-cuddling: true
revive:
ignore-generated-header: false
severity: error
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
- name: empty-block
- name: superfluous-else
- name: unreachable-code
- name: redefines-builtin-id
- name: atomic
- name: constant-logical-expr
- name: unnecessary-stmt
- name: get-return
- name: modifies-parameter
- name: modifies-value-receiver
- name: range-val-in-closure
- name: waitgroup-by-value
- name: call-to-gc
- name: duplicated-imports
- name: unhandled-error
# - name: flag-parameter
# - name: unused-receiver
# - name: unused-parameter
# - name: confusing-naming
# - name: import-shadowing
# - name: confusing-results
# - name: bool-literal-in-expr

linters:
disable-all: true
enable:
- asasalint
- asciicheck
Expand Down Expand Up @@ -108,31 +154,29 @@ linters:
- wastedassign
- whitespace
- wsl
disable:
- exhaustivestruct
- gochecknoglobals
- gochecknoinits
- godot
- godox
- paralleltest
- goerr113 # TODO: Need to introduce error definition and bring this back
- goheader # TODO: Introduce back post fixing linter errors
- gci
- interfacer # interfacer linter is archived and deprecated (https://github.com/mvdan/interfacer)
# TODO: fix folloing linter errors.
- exhaustruct
- tagliatelle
- gomoddirectives
- goimports
- wrapcheck
- varnamelen
- staticcheck
- nosnakecase
- ireturn
- nilnil
- containedctx
- nonamedreturns
- forcetypeassert
- promlinter
- contextcheck
- errname
# - exhaustivestruct
# - gochecknoglobals
# - gochecknoinits
# - godot
# - godox
# - paralleltest
# - goerr113 # TODO: Need to introduce error definition and bring this back
# - goheader # TODO: Introduce back post fixing linter errors
# - gci
# - interfacer # interfacer linter is archived and deprecated (https://github.com/mvdan/interfacer)
# - exhaustruct
# - tagliatelle
# - gomoddirectives
# - goimports
# - wrapcheck
# - varnamelen
# - staticcheck
# - nosnakecase
# - ireturn
# - nilnil
# - containedctx
# - nonamedreturns
# - forcetypeassert
# - promlinter
# - contextcheck
# - errname