Skip to content

Commit

Permalink
upgrade linter and linter settings
Browse files Browse the repository at this point in the history
  • Loading branch information
cornelk committed Nov 5, 2024
1 parent 865e213 commit 330e9f0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ linters:
- 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
- exportloopref # checks for pointers to enclosing loop variables
- funlen # Tool for detection of long functions
- gci # controls golang package import order and makes it always deterministic
- gocheckcompilerdirectives # Checks that go compiler directive comments (//go:) are valid
Expand All @@ -34,8 +33,8 @@ linters:
- govet # reports suspicious constructs, such as Printf calls with wrong arguments
- grouper # An analyzer to analyze expression groups
- ineffassign # Detects when assignments to existing variables are not used
- intrange # is a linter to find places where for loops could make use of an integer range
- ireturn # Accept Interfaces, Return Concrete Types
- intrange # finds places where for loops could make use of an integer range.
- ireturn # accept Interfaces, Return Concrete Types
- maintidx # measures the maintainability index of each function
- makezero # Finds slice declarations with non-zero initial length
- mirror # reports wrong mirror patterns of bytes/strings usage
Expand All @@ -52,7 +51,6 @@ linters:
- staticcheck # drop-in replacement of go vet
- stylecheck # Stylecheck is a replacement for golint
- tenv # detects using os.Setenv instead of t.Setenv
- testifylint # Checks usage of github.com/stretchr/testify
- thelper # checks the consistency of test helpers
- tparallel # detects inappropriate usage of t.Parallel()
- typecheck # parses and type-checks Go code
Expand All @@ -79,10 +77,10 @@ linters-settings:
disabled: true
- name: var-naming
disabled: true

stylecheck:
# ST1001: should not use dot imports
checks: [ "all", "-ST1001" ]
checks:
- "all"
- "-ST1001" # should not use dot imports
whitespace:
multi-if: true # Enforces newlines (or comments) after every multi-line if statement
multi-func: true # Enforces newlines (or comments) after every multi-line function signature
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.59.1
GOLANGCI_VERSION = v1.61.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 internal/assembler/nesasm/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func setPrgBankSelector(prg []program.Offset, index int, bankAddress, bankNumber
offsetInfo.Comment, offsetInfo.Code)
data := offsetInfo.OpcodeBytes

for i := range len(data) {
for i := range data {
offsetInfo = &prg[instructionStartIndex+i]
offsetInfo.OpcodeBytes = data[i : i+1]
offsetInfo.ClearType(program.CodeOffset)
Expand Down

0 comments on commit 330e9f0

Please sign in to comment.