Skip to content

Commit

Permalink
Merge pull request #51 from estesp/update-xsys
Browse files Browse the repository at this point in the history
Update Go vers, x/sys vendor
  • Loading branch information
dmcgowan committed Feb 17, 2023
2 parents 7996c23 + b5d5bb2 commit 151b205
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 25
- uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.20.x
- uses: containerd/project-checks@v1.1.0
with:
working-directory: src/github.com/containerd/fifo
Expand All @@ -32,7 +32,7 @@ jobs:

strategy:
matrix:
go-version: [1.18.x]
go-version: [1.20.x]
os: [ubuntu-22.04, macos-12, windows-2022]

steps:
Expand All @@ -48,7 +48,7 @@ jobs:
- uses: golangci/golangci-lint-action@v3
with:
version: v1.50.1
version: v1.51.1
working-directory: src/github.com/containerd/fifo

tests:
Expand All @@ -63,7 +63,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.20.x

- run: make test
working-directory: src/github.com/containerd/fifo
28 changes: 23 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
linters:
enable:
- staticcheck
- unconvert
- exportloopref # Checks for pointers to enclosing loop variables
- gofmt
- goimports
- golint
- gosec
- ineffassign
- vet
- unused
- misspell
- nolintlint
- revive
- staticcheck
- tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17
- unconvert
- unused
- vet
- dupword # Checks for duplicate words in the source code
disable:
- errcheck

linters-settings:
gosec:
# The following issues surfaced when `gosec` linter
# was enabled. They are temporarily excluded to unblock
# the existing workflow, but still to be addressed by
# future works.
excludes:
- G204
- G305
- G306
- G402
- G404

run:
timeout: 3m
skip-dirs:
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/containerd/fifo
go 1.18

require (
github.com/stretchr/testify v1.8.0
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8
github.com/stretchr/testify v1.8.1
golang.org/x/sys v0.5.0
)

require (
Expand Down
8 changes: 5 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Expand Down
2 changes: 1 addition & 1 deletion handle_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"syscall"
)

//nolint:golint
//nolint:revive
const O_PATH = 010000000

type handle struct {
Expand Down
6 changes: 3 additions & 3 deletions handle_nolinux.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func getHandle(fn string) (*handle, error) {

h := &handle{
fn: fn,
dev: uint64(stat.Dev), //nolint: unconvert
ino: uint64(stat.Ino), //nolint: unconvert
dev: uint64(stat.Dev), //nolint:unconvert,nolintlint
ino: uint64(stat.Ino), //nolint:unconvert,nolintlint
}

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

0 comments on commit 151b205

Please sign in to comment.