Skip to content

Commit 151b205

Browse files
authored
Merge pull request #51 from estesp/update-xsys
Update Go vers, x/sys vendor
2 parents 7996c23 + b5d5bb2 commit 151b205

File tree

6 files changed

+38
-18
lines changed

6 files changed

+38
-18
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
fetch-depth: 25
2121
- uses: actions/setup-go@v3
2222
with:
23-
go-version: 1.18.x
23+
go-version: 1.20.x
2424
- uses: containerd/[email protected]
2525
with:
2626
working-directory: src/github.com/containerd/fifo
@@ -32,7 +32,7 @@ jobs:
3232

3333
strategy:
3434
matrix:
35-
go-version: [1.18.x]
35+
go-version: [1.20.x]
3636
os: [ubuntu-22.04, macos-12, windows-2022]
3737

3838
steps:
@@ -48,7 +48,7 @@ jobs:
4848
4949
- uses: golangci/golangci-lint-action@v3
5050
with:
51-
version: v1.50.1
51+
version: v1.51.1
5252
working-directory: src/github.com/containerd/fifo
5353

5454
tests:
@@ -63,7 +63,7 @@ jobs:
6363

6464
- uses: actions/setup-go@v3
6565
with:
66-
go-version: 1.18.x
66+
go-version: 1.20.x
6767

6868
- run: make test
6969
working-directory: src/github.com/containerd/fifo

.golangci.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,35 @@
11
linters:
22
enable:
3-
- staticcheck
4-
- unconvert
3+
- exportloopref # Checks for pointers to enclosing loop variables
54
- gofmt
65
- goimports
7-
- golint
6+
- gosec
87
- ineffassign
9-
- vet
10-
- unused
118
- misspell
9+
- nolintlint
10+
- revive
11+
- staticcheck
12+
- tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17
13+
- unconvert
14+
- unused
15+
- vet
16+
- dupword # Checks for duplicate words in the source code
1217
disable:
1318
- errcheck
1419

20+
linters-settings:
21+
gosec:
22+
# The following issues surfaced when `gosec` linter
23+
# was enabled. They are temporarily excluded to unblock
24+
# the existing workflow, but still to be addressed by
25+
# future works.
26+
excludes:
27+
- G204
28+
- G305
29+
- G306
30+
- G402
31+
- G404
32+
1533
run:
1634
timeout: 3m
1735
skip-dirs:

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module github.com/containerd/fifo
33
go 1.18
44

55
require (
6-
github.com/stretchr/testify v1.8.0
7-
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8
6+
github.com/stretchr/testify v1.8.1
7+
golang.org/x/sys v0.5.0
88
)
99

1010
require (

go.sum

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
55
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
66
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
77
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
8+
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
89
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
9-
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
1010
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
11-
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
12-
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
11+
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
12+
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
13+
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
14+
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1315
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
1416
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1517
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

handle_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"syscall"
2626
)
2727

28-
//nolint:golint
28+
//nolint:revive
2929
const O_PATH = 010000000
3030

3131
type handle struct {

handle_nolinux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ func getHandle(fn string) (*handle, error) {
3737

3838
h := &handle{
3939
fn: fn,
40-
dev: uint64(stat.Dev), //nolint: unconvert
41-
ino: uint64(stat.Ino), //nolint: unconvert
40+
dev: uint64(stat.Dev), //nolint:unconvert,nolintlint
41+
ino: uint64(stat.Ino), //nolint:unconvert,nolintlint
4242
}
4343

4444
return h, nil
@@ -49,7 +49,7 @@ func (h *handle) Path() (string, error) {
4949
if err := syscall.Stat(h.fn, &stat); err != nil {
5050
return "", fmt.Errorf("path %v could not be statted: %w", h.fn, err)
5151
}
52-
if uint64(stat.Dev) != h.dev || uint64(stat.Ino) != h.ino { //nolint: unconvert
52+
if uint64(stat.Dev) != h.dev || uint64(stat.Ino) != h.ino { //nolint:unconvert,nolintlint
5353
return "", fmt.Errorf("failed to verify handle %v/%v %v/%v for %v", stat.Dev, h.dev, stat.Ino, h.ino, h.fn)
5454
}
5555
return h.fn, nil

0 commit comments

Comments
 (0)