Skip to content

Commit

Permalink
upgrade linter and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cornelk committed May 31, 2024
1 parent 8ab5eaf commit 8d9a04b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ linters:
- bidichk # Checks for dangerous unicode character sequences
- containedctx # detects struct contained context.Context field
- contextcheck # check the function whether use a non-inherited context
- copyloopvar # detects places where loop variables are copied
- cyclop # checks function and package cyclomatic complexity
- decorder # check declaration order and count of types, constants, variables and functions
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
- durationcheck # check for two durations multiplied together
- err113 # Golang linter to check the errors handling expressions
- errcheck # checking for unchecked errors
- errname # Checks that 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
Expand All @@ -25,8 +27,8 @@ linters:
- gocritic # Provides diagnostics that check for bugs, performance and style issues
- gocyclo # Computes and checks the cyclomatic complexity of functions
- godot # Check if comments end in a period
- goerr113 # Golang linter to check the errors handling expressions
- gofmt # checks whether code was gofmt-ed
- goimports # Check import statements are formatted according to the 'goimport' command
- gosimple # Linter for Go source code that specializes in simplifying a code
- govet # reports suspicious constructs, such as Printf calls with wrong arguments
- grouper # An analyzer to analyze expression groups
Expand Down Expand Up @@ -73,7 +75,7 @@ issues:
exclude-use-default: false
exclude-rules:
- linters:
- goerr113
- err113
text: "do not define dynamic errors"
- linters:
- revive
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GOLANGCI_VERSION = v1.57.0
GOLANGCI_VERSION = v1.59.0

help: ## show help, shown by default if no target is specified
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module github.com/retroenv/nesgodisasm

go 1.22

require github.com/retroenv/retrogolib v0.0.0-20240304170601-1176bfc2fb7c
require github.com/retroenv/retrogolib v0.0.0-20240429170148-9ce0db22ccb0
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
github.com/retroenv/retrogolib v0.0.0-20240304170601-1176bfc2fb7c h1:D9vm2K2Po+MTs0t/UdGY/hLzI8YSfwxLxpVxA5EQuaM=
github.com/retroenv/retrogolib v0.0.0-20240304170601-1176bfc2fb7c/go.mod h1:kvmonrBF8P56SmAZwPA29fWgNEhFNHQ9cxXpy/w8Uio=
github.com/retroenv/retrogolib v0.0.0-20240429170148-9ce0db22ccb0 h1:Yc5x58s3NvQJjsgEQ+fyleW9oAYe/vBadMB++bO8VUA=
github.com/retroenv/retrogolib v0.0.0-20240429170148-9ce0db22ccb0/go.mod h1:HZ3Y8NA+pJQrTLDJ6VSg/X6Oo4jWxz2S9ZMSvv8Zm1o=
2 changes: 1 addition & 1 deletion internal/disasm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func runDisasm(t *testing.T, setup func(options *options.Disassembler, cart *car
writer := bufio.NewWriter(&buffer)

newBankWriter := func(_ string) (io.WriteCloser, error) {
return nil, nil
return nil, nil // nolint: nilnil
}

err := disasm.Process(writer, newBankWriter)
Expand Down
1 change: 0 additions & 1 deletion internal/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func TestChangeOffsetRangeToData(t *testing.T) {
logger := log.NewTestLogger(t)

for _, test := range tests {
test := test
t.Run(test.Name, func(t *testing.T) {
t.Parallel()

Expand Down

0 comments on commit 8d9a04b

Please sign in to comment.