Skip to content

Commit

Permalink
ci: add deadcode checking in gometalinter
Browse files Browse the repository at this point in the history
Signed-off-by: Allen Sun <[email protected]>
  • Loading branch information
allencloud committed Nov 8, 2018
1 parent c7a568e commit 0ecdefb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
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

0 comments on commit 0ecdefb

Please sign in to comment.