all: upgrade to golangci-lint v1.55.2 (#416)
Upgrade `golangci-lint` to address a bug triggered since Go 1.21.5. See: golangci/golangci-lint#3718 See: golang/go#64592
This commit is contained in:
committed by
GitHub
parent
3a05880d92
commit
d84f103398
@@ -14,12 +14,14 @@ linters:
|
|||||||
- funlen
|
- funlen
|
||||||
- gochecknoglobals
|
- gochecknoglobals
|
||||||
- gochecknoinits
|
- gochecknoinits
|
||||||
|
- goconst
|
||||||
- godox
|
- godox
|
||||||
- goerr113
|
- goerr113
|
||||||
- golint
|
- golint
|
||||||
- gomnd
|
- gomnd
|
||||||
- gosec
|
- gosec
|
||||||
- ifshort
|
- ifshort
|
||||||
|
- inamedparam
|
||||||
- interfacer
|
- interfacer
|
||||||
- ireturn
|
- ireturn
|
||||||
- lll
|
- lll
|
||||||
@@ -29,6 +31,7 @@ linters:
|
|||||||
- nosnakecase
|
- nosnakecase
|
||||||
- paralleltest
|
- paralleltest
|
||||||
- prealloc
|
- prealloc
|
||||||
|
- perfsprint
|
||||||
- rowserrcheck
|
- rowserrcheck
|
||||||
- scopelint
|
- scopelint
|
||||||
- structcheck
|
- structcheck
|
||||||
@@ -42,15 +45,56 @@ linters:
|
|||||||
- wsl
|
- wsl
|
||||||
linters-settings:
|
linters-settings:
|
||||||
depguard:
|
depguard:
|
||||||
list-type: whitelist
|
rules:
|
||||||
packages:
|
main:
|
||||||
|
allow:
|
||||||
- github.com/mmcloughlin/avo
|
- github.com/mmcloughlin/avo
|
||||||
- golang.org/x/
|
- golang.org/x/
|
||||||
|
- $gostd
|
||||||
gci:
|
gci:
|
||||||
sections:
|
sections:
|
||||||
- standard
|
- standard
|
||||||
- default
|
- default
|
||||||
- prefix(github.com/mmcloughlin/avo)
|
- prefix(github.com/mmcloughlin/avo)
|
||||||
|
revive:
|
||||||
|
enable-all-rules: true
|
||||||
|
rules:
|
||||||
|
- name: add-constant
|
||||||
|
disabled: true
|
||||||
|
- name: confusing-results
|
||||||
|
disabled: true
|
||||||
|
- name: cognitive-complexity
|
||||||
|
disabled: true
|
||||||
|
- name: cyclomatic
|
||||||
|
disabled: true
|
||||||
|
- name: deep-exit
|
||||||
|
disabled: true
|
||||||
|
- name: empty-block
|
||||||
|
disabled: true
|
||||||
|
- name: flag-parameter
|
||||||
|
disabled: true
|
||||||
|
- name: function-length
|
||||||
|
disabled: true
|
||||||
|
- name: if-return
|
||||||
|
disabled: true
|
||||||
|
- name: line-length-limit
|
||||||
|
disabled: true
|
||||||
|
- name: max-public-structs
|
||||||
|
disabled: true
|
||||||
|
- name: modifies-value-receiver
|
||||||
|
disabled: true
|
||||||
|
- name: unexported-naming
|
||||||
|
disabled: true
|
||||||
|
- name: unhandled-error
|
||||||
|
arguments:
|
||||||
|
- 'fmt\.(P|Fp)rint(ln|f)?'
|
||||||
|
- 'text/tabwriter\.Writer\.Flush'
|
||||||
|
- name: unused-parameter
|
||||||
|
disabled: true
|
||||||
|
- name: unused-receiver
|
||||||
|
disabled: true
|
||||||
|
- name: use-any
|
||||||
|
disabled: true
|
||||||
issues:
|
issues:
|
||||||
exclude-use-default: false
|
exclude-use-default: false
|
||||||
exclude:
|
exclude:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
go install ./internal/cmd/asmvet
|
go install ./internal/cmd/asmvet
|
||||||
|
|
||||||
# golangci-lint for linting
|
# golangci-lint for linting
|
||||||
golangci_lint_version='v1.51.2'
|
golangci_lint_version='v1.55.2'
|
||||||
golangci_install_script="https://raw.githubusercontent.com/golangci/golangci-lint/${golangci_lint_version}/install.sh"
|
golangci_install_script="https://raw.githubusercontent.com/golangci/golangci-lint/${golangci_lint_version}/install.sh"
|
||||||
curl -sfL "${golangci_install_script}" | sh -s -- -b "$(go env GOPATH)/bin" "${golangci_lint_version}"
|
curl -sfL "${golangci_install_script}" | sh -s -- -b "$(go env GOPATH)/bin" "${golangci_lint_version}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user