Add dependencies for code generator
This commit is contained in:
parent
89c157c63b
commit
3dd1699637
542 changed files with 113723 additions and 190 deletions
|
|
@ -139,6 +139,7 @@ skipped_dirs = [
|
|||
'.git',
|
||||
"vendor",
|
||||
"test/e2e/framework/framework.go",
|
||||
"images"
|
||||
]
|
||||
|
||||
|
||||
|
|
|
|||
25
hack/tools.go
Normal file
25
hack/tools.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// +build tools
|
||||
|
||||
/*
|
||||
Copyright 2019 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
// This package contains code generation utilities
|
||||
// This package imports things required by build scripts, to force `go mod` to see them as dependencies
|
||||
package tools
|
||||
|
||||
import (
|
||||
_ "k8s.io/code-generator"
|
||||
)
|
||||
|
|
@ -29,6 +29,8 @@ CODEGEN_PKG=${CODEGEN_PKG:-$(cd "${SCRIPT_ROOT}"; ls -d -1 ./vendor/k8s.io/code-
|
|||
# k8s.io/ingress-nginx/pkg/client k8s.io/ingress-nginx/pkg/apis \
|
||||
# nginxingress:v1alpha1 \
|
||||
# --output-base "$(dirname ${BASH_SOURCE})/../../.."
|
||||
mkdir -p ${CODEGEN_PKG}/hack
|
||||
cp ${SCRIPT_ROOT}/hack/boilerplate/boilerplate.go.txt ${CODEGEN_PKG}/hack/boilerplate.go.txt
|
||||
|
||||
${CODEGEN_PKG}/generate-groups.sh "deepcopy" \
|
||||
k8s.io/ingress-nginx/internal k8s.io/ingress-nginx/internal \
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
|||
cd "${KUBE_ROOT}"
|
||||
|
||||
GOLINT=${GOLINT:-"golint"}
|
||||
PACKAGES=($(go list ./... | grep -v /vendor/))
|
||||
PACKAGES=($(go list ./internal/... | grep -v /vendor/))
|
||||
bad_files=()
|
||||
for package in "${PACKAGES[@]}"; do
|
||||
out=$("${GOLINT}" -min_confidence=0.9 "${package}" | grep -v -E '(should not use dot imports|internal/file/bindata.go)' || :)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue