Skip to content

Commit

Permalink
Merge pull request #1011 from wader/go1.22-update-linter
Browse files Browse the repository at this point in the history
go,lint: Update to go 1.22 and fix some lint warnings
  • Loading branch information
wader authored Sep 12, 2024
2 parents 8d55f92 + 7b6d853 commit f150085
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
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

0 comments on commit f150085

Please sign in to comment.