diff --git a/.circleci/config.yml b/.circleci/config.yml index 665bdfd5d..a614825b8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: diff --git a/ctrd/utils.go b/ctrd/utils.go index 9ba4e7d0b..955ed7df6 100644 --- a/ctrd/utils.go +++ b/ctrd/utils.go @@ -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" ) @@ -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{}