Merge pull request #31104 from sttts/sttts-sort-linted-packages

Automatic merge from submit-queue

Sort hack/.linted packages

Appending to the file by default creates merge conflicts in the submit queue. Sorting will reduce that considerably.
This commit is contained in:
Kubernetes Submit Queue 2016-08-23 16:52:35 -07:00 committed by GitHub
commit 6d6ce86bae
2 changed files with 43 additions and 27 deletions

View File

@ -9,10 +9,10 @@ cmd/kube-apiserver/app
cmd/kube-apiserver/app/options
cmd/kube-controller-manager
cmd/kube-controller-manager/app/options
cmd/kubectl
cmd/kube-dns
cmd/kubelet
cmd/kube-proxy
cmd/kubectl
cmd/kubelet
cmd/kubernetes-discovery
cmd/libs/go2idl/client-gen/generators
cmd/libs/go2idl/client-gen/test_apis/testgroup.k8s.io/install
@ -52,26 +52,26 @@ pkg/api
pkg/api/annotations
pkg/api/errors
pkg/api/install
pkg/apimachinery
pkg/api/meta
pkg/api/resource
pkg/api/service
pkg/api/v1
pkg/apimachinery
pkg/apis/abac/v0
pkg/apis/apps/install
pkg/apis/authentication/install
pkg/apis/authentication.k8s.io/install
pkg/apis/authentication/install
pkg/apis/authorization/install
pkg/apis/autoscaling/install
pkg/apis/batch/install
pkg/apis/certificates/install
pkg/apis/componentconfig/install
pkg/apiserver/audit
pkg/api/service
pkg/apis/extensions/install
pkg/apis/extensions/v1beta1
pkg/apis/imagepolicy/install
pkg/apis/policy/install
pkg/apis/rbac/install
pkg/apis/imagepolicy/install
pkg/api/v1
pkg/apiserver/audit
pkg/auth/authenticator
pkg/auth/authorizer/union
pkg/client/metrics
@ -98,36 +98,36 @@ pkg/credentialprovider/aws
pkg/hyperkube
pkg/kubelet/api
pkg/kubelet/container
pkg/kubelet/eviction
pkg/kubelet/envvars
pkg/kubelet/eviction
pkg/kubelet/util/format
pkg/kubelet/util/ioutils
pkg/kubelet/volume
pkg/kubelet/volume/cache
pkg/kubelet/volume/populator
pkg/kubelet/volume/reconciler
pkg/kubelet/volumemanager
pkg/kubelet/volumemanager/cache
pkg/kubelet/volumemanager/populator
pkg/kubelet/volumemanager/reconciler
pkg/kubelet/volume/populator
pkg/kubelet/volume/reconciler
pkg/proxy/config
pkg/proxy/healthcheck
pkg/quota/install
pkg/registry
pkg/registry/authorization/util
pkg/registry/clusterrolebinding/etcd
pkg/registry/clusterrole/etcd
pkg/registry/clusterrolebinding/etcd
pkg/registry/configmap/etcd
pkg/registry/endpoint
pkg/registry/node/rest
pkg/registry/pod/etcd
pkg/registry/podsecuritypolicy/etcd
pkg/registry/rangeallocation
pkg/registry/rolebinding/etcd
pkg/registry/role/etcd
pkg/registry/serviceaccount
pkg/registry/rolebinding/etcd
pkg/registry/service/ipallocator/controller
pkg/registry/service/ipallocator/etcd
pkg/registry/serviceaccount
pkg/registry/thirdpartyresource
pkg/registry/thirdpartyresource/etcd
pkg/runtime
@ -137,6 +137,7 @@ pkg/runtime/serializer/recognizer/testing
pkg/runtime/serializer/versioning
pkg/runtime/serializer/yaml
pkg/security
pkg/security/podsecuritypolicy/apparmor
pkg/security/podsecuritypolicy/capabilities
pkg/serviceaccount
pkg/storage
@ -156,10 +157,12 @@ pkg/util/io
pkg/util/json
pkg/util/limitwriter
pkg/util/logs
pkg/util/maps
pkg/util/validation/field
pkg/util/workqueue
pkg/volume
pkg/volume/downwardapi
pkg/volume/quobyte
pkg/volume/util/nestedpendingoperations
pkg/volume/util/operationexecutor
pkg/volume/util/types
@ -194,17 +197,14 @@ test/images/fakegitserver
test/images/goproxy
test/images/mount-tester
test/images/n-way-http
test/images/porter
test/images/port-forward-tester
test/images/porter
test/images/resource-consumer/consume-cpu
test/images/serve_hostname
test/integration/discoverysummarizer
test/integration/examples
test/integration/federation
test/integration/openshift
test/soak/cauldron
test/soak/serve_hostnames
third_party/forked/golang/expansion
pkg/util/maps
pkg/volume/quobyte
test/integration/discoverysummarizer
test/integration/examples
test/integration/federation
pkg/security/podsecuritypolicy/apparmor

View File

@ -37,11 +37,23 @@ array_contains () {
return $in
}
# Check that the file is in alphabetical order
linted_file="${KUBE_ROOT}/hack/.linted_packages"
if ! diff -u "${linted_file}" <(LANG=C sort "${linted_file}"); then
{
echo
echo "hack/.linted_packages is not in alphabetical order. Please sort it:"
echo
echo " sort -o hack/.linted_packages hack/.linted_packages"
echo
} >&2
false
fi
export IFS=$'\n'
all_packages=(
$(go list -e ./... | egrep -v "/(third_party|vendor|staging|generated|clientset_generated)" | sed 's/k8s.io\/kubernetes\///g')
)
linted_file="${KUBE_ROOT}/hack/.linted_packages"
linted_packages=(
$(cat $linted_file)
)
@ -78,16 +90,20 @@ else
fi
# check to make sure all packages that pass lint are in the linted file.
echo
if [ ${#linted[@]} -eq 0 ]; then
echo 'Success! All packages that should pass lint are listed in the linted file.'
else
{
echo "The following packages passed golint but are not listed in $linted_file:"
echo "Some packages passed golint but are not listed in hack/.linted_packages."
echo "Please add them in alphabetical order:"
echo
for p in "${linted[@]}"; do
echo " echo $p >> hack/.linted_packages"
done
echo " LANG=C sort -o hack/.linted_packages hack/.linted_packages"
echo
echo 'Please add the following packages to the linted file. You can test via this script and commit the result.'
echo 'You can test via this script and commit the result.'
echo
} >&2
false