Skip to content

Commit

Permalink
Merge pull request #61 from thaJeztah/update_ci
Browse files Browse the repository at this point in the history
gha: update to go 1.17, update golangci-lint to v1.44, and gofmt
  • Loading branch information
AkihiroSuda authored Feb 14, 2022
2 parents b5cb846 + 4b3f90d commit 1b12abd
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 15 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
go-version: 1.17.x
id: go

- name: Setup Go binary path
Expand All @@ -39,12 +39,10 @@ jobs:
path: src/github.com/containerd/project

- name: Install dependencies
env:
GO111MODULE: off
run: |
go get -u github.com/vbatts/git-validation
go get -u github.com/kunalkushwaha/ltag
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.23.8
go install github.com/vbatts/git-validation@latest
go install github.com/kunalkushwaha/ltag@latest
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.44.0
- name: Check DCO/whitespace/commit message
env:
Expand Down
14 changes: 7 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt
- goimports
- golint
- ineffassign
- vet
- unused
- misspell
- revive
- staticcheck
- structcheck
- unconvert
- unused
- varcheck
- vet
disable:
- errcheck

Expand Down
2 changes: 1 addition & 1 deletion console.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func Current() (c Console) {
}

// ConsoleFromFile returns a console using the provided file
// nolint:golint
// nolint:revive
func ConsoleFromFile(f File) (Console, error) {
if err := checkConsole(f); err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions console_linux.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

/*
Expand Down
1 change: 1 addition & 0 deletions console_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux || solaris || zos || freebsd
// +build linux solaris zos freebsd

/*
Expand Down
1 change: 1 addition & 0 deletions console_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin || freebsd || linux || netbsd || openbsd || solaris
// +build darwin freebsd linux netbsd openbsd solaris

/*
Expand Down
3 changes: 2 additions & 1 deletion console_zos.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build zos
// +build zos

/*
Expand Down Expand Up @@ -32,7 +33,7 @@ func NewPty() (Console, string, error) {
var f File
var err error
var slave string
for i := 0;; i++ {
for i := 0; ; i++ {
ptyp := fmt.Sprintf("/dev/ptyp%04d", i)
f, err = os.OpenFile(ptyp, os.O_RDWR, 0600)
if err == nil {
Expand Down
1 change: 1 addition & 0 deletions pty_freebsd_cgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build freebsd && cgo
// +build freebsd,cgo

/*
Expand Down
1 change: 1 addition & 0 deletions pty_freebsd_nocgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build freebsd && !cgo
// +build freebsd,!cgo

/*
Expand Down
1 change: 1 addition & 0 deletions pty_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin || linux || netbsd || openbsd || solaris
// +build darwin linux netbsd openbsd solaris

/*
Expand Down
1 change: 1 addition & 0 deletions tc_freebsd_cgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build freebsd && cgo
// +build freebsd,cgo

/*
Expand Down
1 change: 1 addition & 0 deletions tc_freebsd_nocgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build freebsd && !cgo
// +build freebsd,!cgo

/*
Expand Down
1 change: 1 addition & 0 deletions tc_openbsd_cgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build openbsd && cgo
// +build openbsd,cgo

/*
Expand Down
1 change: 1 addition & 0 deletions tc_openbsd_nocgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build openbsd && !cgo
// +build openbsd,!cgo

/*
Expand Down
1 change: 1 addition & 0 deletions tc_solaris_cgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build solaris && cgo
// +build solaris,cgo

/*
Expand Down
1 change: 1 addition & 0 deletions tc_solaris_nocgo.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build solaris && !cgo
// +build solaris,!cgo

/*
Expand Down
1 change: 1 addition & 0 deletions tc_unix.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build darwin || freebsd || linux || netbsd || openbsd || solaris || zos
// +build darwin freebsd linux netbsd openbsd solaris zos

/*
Expand Down

0 comments on commit 1b12abd

Please sign in to comment.