mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
vendor files
This commit is contained in:
37
vendor/k8s.io/kubernetes/cmd/clicheck/BUILD
generated
vendored
Normal file
37
vendor/k8s.io/kubernetes/cmd/clicheck/BUILD
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
load(
|
||||
"@io_bazel_rules_go//go:def.bzl",
|
||||
"go_binary",
|
||||
"go_library",
|
||||
)
|
||||
|
||||
go_binary(
|
||||
name = "clicheck",
|
||||
importpath = "k8s.io/kubernetes/cmd/clicheck",
|
||||
library = ":go_default_library",
|
||||
)
|
||||
|
||||
go_library(
|
||||
name = "go_default_library",
|
||||
srcs = ["check_cli_conventions.go"],
|
||||
importpath = "k8s.io/kubernetes/cmd/clicheck",
|
||||
deps = [
|
||||
"//pkg/kubectl/cmd:go_default_library",
|
||||
"//pkg/kubectl/cmd/util:go_default_library",
|
||||
"//pkg/kubectl/cmd/util/sanity:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
)
|
4
vendor/k8s.io/kubernetes/cmd/clicheck/OWNERS
generated
vendored
Normal file
4
vendor/k8s.io/kubernetes/cmd/clicheck/OWNERS
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
approvers:
|
||||
- sig-cli-maintainers
|
||||
reviewers:
|
||||
- sig-cli
|
55
vendor/k8s.io/kubernetes/cmd/clicheck/check_cli_conventions.go
generated
vendored
Normal file
55
vendor/k8s.io/kubernetes/cmd/clicheck/check_cli_conventions.go
generated
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
Copyright 2016 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.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"k8s.io/kubernetes/pkg/kubectl/cmd"
|
||||
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
|
||||
cmdsanity "k8s.io/kubernetes/pkg/kubectl/cmd/util/sanity"
|
||||
)
|
||||
|
||||
var (
|
||||
skip = []string{}
|
||||
)
|
||||
|
||||
func main() {
|
||||
var errorCount int
|
||||
|
||||
kubectl := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
|
||||
errors := cmdsanity.RunCmdChecks(kubectl, cmdsanity.AllCmdChecks, []string{})
|
||||
for _, err := range errors {
|
||||
errorCount++
|
||||
fmt.Fprintf(os.Stderr, " %d. %s\n", errorCount, err)
|
||||
}
|
||||
|
||||
errors = cmdsanity.RunGlobalChecks(cmdsanity.AllGlobalChecks)
|
||||
for _, err := range errors {
|
||||
errorCount++
|
||||
fmt.Fprintf(os.Stderr, " %d. %s\n", errorCount, err)
|
||||
}
|
||||
|
||||
if errorCount > 0 {
|
||||
fmt.Fprintf(os.Stdout, "Found %d errors.\n", errorCount)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
fmt.Fprintln(os.Stdout, "Congrats, CLI looks good!")
|
||||
}
|
Reference in New Issue
Block a user