Skip to content

Commit

Permalink
all: upgrade to golangci-lint v1.55.2 (#149)
Browse files Browse the repository at this point in the history
Upgrade `golangci-lint` to address a bug triggered since Go 1.21.5.

See: golangci/golangci-lint#3718
See: golang/go#64592
  • Loading branch information
mmcloughlin authored Jan 8, 2024
1 parent 005a79b commit caa8e18
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 4 deletions.
52 changes: 49 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ linters:
- golint
- gomnd
- ifshort
- inamedparam
- interfacer
- ireturn
- lll
Expand All @@ -37,11 +38,56 @@ linters:
- wsl

linters-settings:
depguard:
rules:
main:
allow:
- github.com/mmcloughlin/addchain
- github.com/mmcloughlin/profile
- github.com/google/subcommands
- $gostd
gci:
sections:
- standard
- default
- prefix(github.com/mmcloughlin/addchain)
- standard
- default
- prefix(github.com/mmcloughlin/addchain)
revive:
enable-all-rules: true
confidence: 1.0
rules:
- name: add-constant
disabled: true
- name: bare-return
disabled: true
- name: confusing-naming
disabled: true
- name: cognitive-complexity
disabled: true
- name: cyclomatic
disabled: true
- name: deep-exit
disabled: true
- name: empty-block
disabled: true
- name: function-length
disabled: true
- name: import-shadowing
disabled: true
- name: line-length-limit
disabled: true
- name: max-public-structs
disabled: true
- name: unchecked-type-assertion
disabled: true
- name: unhandled-error
arguments:
- 'fmt\.(P|Fp)rint(ln|f)?'
- name: unused-parameter
disabled: true
- name: unused-receiver
disabled: true
- name: use-any
disabled: true

issues:
exclude-use-default: false
Expand Down
2 changes: 1 addition & 1 deletion script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -exuo pipefail

# Install golangci-lint
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"
curl -sfL "${golangci_install_script}" | sh -s -- -b "$GOPATH/bin" "${golangci_lint_version}"

Expand Down

0 comments on commit caa8e18

Please sign in to comment.