Skip to content

Commit

Permalink
chore: linter updates and such
Browse files Browse the repository at this point in the history
  • Loading branch information
carlmontanari committed Jun 1, 2024
1 parent 824e107 commit 7a34c42
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
go-version: ${{ matrix.go-version }}

- name: lint
uses: golangci/golangci-lint-action@v5
uses: golangci/golangci-lint-action@v6
with:
version: v1.57
version: v1.59
args: --timeout 5m
# caching issues, see: https://github.com/golangci/golangci-lint-action/issues/244#issuecomment-1052190775
skip-pkg-cache: true
Expand Down
8 changes: 4 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ linters:
- dupl
- dupword
- durationcheck
- err113
- errcheck
- errchkjson
- errname
Expand All @@ -48,11 +49,9 @@ linters:
- gocyclo
- godot
- godox
- goerr113
- gofmt
- gofumpt
- goimports
- gomnd
- goprintffuncname
- gosec
- gosimple
Expand All @@ -64,6 +63,7 @@ linters:
- maintidx
- makezero
- misspell
- mnd
- nakedret
- nestif
- nilerr
Expand Down Expand Up @@ -117,10 +117,10 @@ issues:
text: "package-comments"

run:
go: '1.21'
go: '1.22'

output:
uniq-by-line: false

service:
golangci-lint-version: 1.57.x
golangci-lint-version: 1.59.x
2 changes: 1 addition & 1 deletion driver/netconf/open_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func testOpen(testName string, testCase *util.PayloadTestCase) func(t *testing.T
options.WithTransportType(transport.FileTransport),
options.WithFileTransportFile(resolveFile(t, testCase.PayloadFile)),
options.WithReadDelay(0),
options.WithTimeoutOps(1*time.Second),
options.WithTimeoutOps(2*time.Second),
)
if err != nil {
errChan <- err
Expand Down
2 changes: 1 addition & 1 deletion driver/netconf/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (d *Driver) sendRPC(
break
}

time.Sleep(5 * time.Microsecond) //nolint: gomnd
time.Sleep(5 * time.Microsecond) //nolint: mnd
}

done <- data
Expand Down
4 changes: 2 additions & 2 deletions transport/telnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (t *Telnet) handleControlCharResponse(ctrlBuf []byte, c byte) ([]byte, erro
}
} else if len(ctrlBuf) == 1 && util.ByteIsAny(c, []byte{do, dont, will, wont}) {
ctrlBuf = append(ctrlBuf, c)
} else if len(ctrlBuf) == 2 { //nolint:gomnd
} else if len(ctrlBuf) == 2 { //nolint:mnd
cmd := ctrlBuf[1:2][0]
ctrlBuf = make([]byte, 0)

Expand Down Expand Up @@ -85,7 +85,7 @@ func (t *Telnet) handleControlChars(a *Args) error {
}

// speed up timeout after initial Read
d = a.TimeoutSocket / controlCharSocketTimeoutDivisor * 2 //nolint:gomnd
d = a.TimeoutSocket / controlCharSocketTimeoutDivisor * 2 //nolint:mnd

charBuf := make([]byte, 1)

Expand Down

0 comments on commit 7a34c42

Please sign in to comment.