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

ci: add deadcode checking in gometalinter #2442

Merged
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
5 changes: 5 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jobs:
name: validate go code with gometalinter
command: |
gometalinter --disable-all --skip vendor -E gofmt -E goimports -E golint -E ineffassign -E misspell -E vet -E megacheck ./...

- run:
name: detect deadcode without test folder
command: |
gometalinter --disable-all --skip vendor --skip test -E deadcode ./...

notify:
webhooks:
Expand Down
13 changes: 0 additions & 13 deletions ctrd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/containerd/containerd/oci"
"github.com/containerd/containerd/remotes"
"github.com/containerd/containerd/remotes/docker"
"github.com/opencontainers/image-spec/specs-go/v1"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
)
Expand Down Expand Up @@ -77,18 +76,6 @@ func resolver(authConfig *types.AuthConfig) (remotes.Resolver, error) {
return docker.NewResolver(options), nil
}

// rootFSToAPIType transfer the rootfs from OCI format to Pouch format.
func rootFSToAPIType(rootFs *v1.RootFS) types.ImageInfoRootFS {
var layers []string
for _, l := range rootFs.DiffIDs {
layers = append(layers, l.String())
}
return types.ImageInfoRootFS{
Type: rootFs.Type,
Layers: layers,
}
}

// toLinuxResources transfers Pouch Resources to LinuxResources.
func toLinuxResources(resources types.Resources) (*specs.LinuxResources, error) {
r := &specs.LinuxResources{}
Expand Down