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

Deprecated linter "exportloopref" replaced with "copyloopvar". #1475

Merged
merged 2 commits into from
Aug 28, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
args: -c .golangci.yml
# Strict linter configuration, only checking new code from pull requests.
- name: golangci-lint-strict
run: golangci-lint run -c .golangci-strict.yml --new-from-rev=origin/master --out-format=github-actions,line-number
run: golangci-lint run -c .golangci-strict.yml --new-from-rev=origin/master --out-format=colored-line-number

build:
name: ubuntu
Expand All @@ -46,7 +46,7 @@ jobs:
cache: true

- name: Set up GolangCI-Lint
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $HOME/bin v1.59.0
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $HOME/bin v1.60.2

- name: Check out code into the Go module directory
uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions .golangci-strict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ linters:
- errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
- errorlint # finds code that will cause problems with the error wrapping scheme introduced in Go 1.13
- exhaustive # checks exhaustiveness of enum switch statements
- exportloopref # checks for pointers to enclosing loop variables
- forbidigo # forbids identifiers
- funlen # tool for detection of long functions
- gocheckcompilerdirectives # validates go compiler directive comments (//go:)
Expand Down Expand Up @@ -243,6 +242,7 @@ linters:
- usestdlibvars # detects the possibility to use variables/constants from the Go standard library
- wastedassign # finds wasted assignment statements
- whitespace # detects leading and trailing whitespace
- copyloopvar # detects places where loop variables are copied

## you may want to enable
#- decorder # checks declaration order and count of types, constants, variables and functions
Expand Down Expand Up @@ -289,7 +289,6 @@ linters:
#- interfacer # [deprecated] suggests narrower interface types
#- maligned # [deprecated, replaced by govet fieldalignment] detects Go structs that would take less memory if their fields were sorted
#- nosnakecase # [deprecated, replaced by revive var-naming] detects snake case of variable naming and function name
#- scopelint # [deprecated, replaced by exportloopref] checks for unpinned variables in go programs
#- structcheck # [deprecated, replaced by unused] finds unused struct fields
#- varcheck # [deprecated, replaced by unused] finds unused global variables and constants

Expand Down
Loading