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

go,lint: Update to go 1.22 and fix some lint warnings #1011

Merged
merged 1 commit into from
Sep 12, 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
10 changes: 6 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ linters:
- errname
- errorlint
- exhaustive
- exportloopref
- forcetypeassert
- goimports
- gosec
Expand All @@ -25,6 +24,7 @@ linters:
- wastedassign
- staticcheck
- govet
- copyloopvar

linters-settings:
revive:
Expand Down Expand Up @@ -54,11 +54,13 @@ linters-settings:
staticcheck:
checks: ["all"]

run:
timeout: 5m
skip-dirs:
issues:
exclude-dirs:
# allow md5
- dev
- doc
# ignore warnings in code from crypto/tls and zmap/zcrypto
- format/tls/tlsdecrypt

run:
timeout: 5m
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing fq

### Build from source

Make sure you have [go](https://go.dev) 1.21 or later installed.
Make sure you have [go](https://go.dev) 1.22 or later installed.

To install directly from git repository (no git clone needed):
```sh
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/wader/fq

go 1.21
go 1.22

// fork of github.com/itchyny/gojq, see github.com/wader/gojq fq branch
require github.com/wader/gojq v0.12.1-0.20240822064856-a7688e3344e7
Expand Down
1 change: 0 additions & 1 deletion pkg/bitio/readwrite64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ func TestWrite64(t *testing.T) {
{0b1, 1, []byte{0b0000_0000}, 7, []byte{0b0000_0001}},
}
for _, tC := range testCases {
tC := tC
t.Run(fmt.Sprintf("%d %d %s", tC.v, tC.nBits, hex.EncodeToString(tC.buf)), func(t *testing.T) {
bitio.Write64(tC.v, tC.nBits, tC.buf, tC.firstBit)
if !bytes.Equal(tC.expectedBuf, tC.buf) {
Expand Down
Loading