From bc256efb5bab2e1bba916eec40d52cf311219ba0 Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Wed, 14 Mar 2018 15:31:21 +0000 Subject: [PATCH] CI: Add maligned linter Run the `maligned` linter to minimise struct space. Includes the single fix required to pass the `maligned` tests. Fixes #1064. Signed-off-by: James O. D. Hunt --- .ci/go-static-checks.sh | 3 ++- exec.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.ci/go-static-checks.sh b/.ci/go-static-checks.sh index da8123e9..f0adeb04 100755 --- a/.ci/go-static-checks.sh +++ b/.ci/go-static-checks.sh @@ -74,6 +74,7 @@ install_package github.com/opennota/check/cmd/varcheck install_package honnef.co/go/tools/cmd/unused install_package honnef.co/go/tools/cmd/staticcheck install_package github.com/mdempsky/unconvert +install_package github.com/mdempsky/maligned echo Doing go static checks on packages: $go_packages @@ -106,7 +107,7 @@ for p in $go_packages; do golint -set_exit_status $p; done echo "Running ineffassign..." go list -f '{{.Dir}}' $go_packages | xargs -L 1 ineffassign -for tool in structcheck varcheck unused staticcheck unconvert +for tool in structcheck varcheck unused staticcheck unconvert maligned do echo "Running ${tool}..." eval "$tool" "$go_packages" diff --git a/exec.go b/exec.go index 5117b796..da6d8738 100644 --- a/exec.go +++ b/exec.go @@ -34,9 +34,9 @@ type execParams struct { pidFile string console string consoleSock string - detach bool processLabel string noSubreaper bool + detach bool } var execCLICommand = cli.Command{