Skip to content

Commit

Permalink
Upgrade golangci-lint to support Go 1.23
Browse files Browse the repository at this point in the history
Took the opportunity to improve rules a bit.
  • Loading branch information
myhro committed Oct 19, 2024
1 parent 3154c40 commit 5f08c57
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
issues:
exclude-rules:
- path: tables/.*\.go
- path: tools/tables.go
linters:
- dupl
linters:
enable-all: true
disable:
- depguard
- exhaustivestruct
- exhaustruct
- forbidigo
Expand All @@ -21,5 +22,10 @@ linters:
- paralleltest
- testpackage
- varnamelen
linters-settings:
revive:
rules:
- name: unused-parameter
disabled: true
run:
tests: false
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ clean:
rm -rf dist/

golangci-lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.1
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.3

gotestsum:
go install gotest.tools/gotestsum@v1.10.0
Expand Down
1 change: 1 addition & 0 deletions tools/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func saveBinary(src io.Reader, dest string) error {
return fmt.Errorf("saveFile: %w", err)
}

//nolint:mnd
err = os.Chmod(dest, 0755)
if err != nil {
return fmt.Errorf("os.Chmod: %w", err)
Expand Down
1 change: 0 additions & 1 deletion tools/tables.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//nolint:dupl
package tools

var Arch = map[string]map[string]map[string]string{
Expand Down

0 comments on commit 5f08c57

Please sign in to comment.