mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-11 17:16:18 +00:00
github.com/bazelbuild/buildtools v0.0.0-20180226164855-80c7f0d45d7e
Used only by github.com/bazelbuild/bazel-gazelle, expecting 80c7f0d45d7e
This commit is contained in:
12
vendor/github.com/bazelbuild/buildtools/buildozer/main.go
generated
vendored
12
vendor/github.com/bazelbuild/buildtools/buildozer/main.go
generated
vendored
@@ -38,6 +38,7 @@ var (
|
||||
editVariables = flag.Bool("edit-variables", false, "For attributes that simply assign a variable (e.g. hdrs = LIB_HDRS), edit the build variable instead of appending to the attribute.")
|
||||
isPrintingProto = flag.Bool("output_proto", false, "output serialized devtools.buildozer.Output protos instead of human-readable strings.")
|
||||
tablesPath = flag.String("tables", "", "path to JSON file with custom table definitions which will replace the built-in tables")
|
||||
addTablesPath = flag.String("add_tables", "", "path to JSON file with custom table definitions which will be merged with the built-in tables")
|
||||
|
||||
shortenLabelsFlag = flag.Bool("shorten_labels", true, "convert added labels to short form, e.g. //foo:bar => :bar")
|
||||
deleteWithComments = flag.Bool("delete_with_comments", true, "If a list attribute should be deleted even if there is a comment attached to it")
|
||||
@@ -67,9 +68,16 @@ func main() {
|
||||
}
|
||||
}
|
||||
|
||||
if *addTablesPath != "" {
|
||||
if err := tables.ParseAndUpdateJSONDefinitions(*addTablesPath, true); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "buildifier: failed to parse %s for -add_tables: %s\n", *addTablesPath, err)
|
||||
os.Exit(2)
|
||||
}
|
||||
}
|
||||
|
||||
edit.ShortenLabelsFlag = *shortenLabelsFlag
|
||||
edit.DeleteWithComments = *deleteWithComments
|
||||
edit.Opts = edit.Options{
|
||||
opts := &edit.Options{
|
||||
Stdout: *stdout,
|
||||
Buildifier: *buildifier,
|
||||
Parallelism: *parallelism,
|
||||
@@ -83,5 +91,5 @@ func main() {
|
||||
EditVariables: *editVariables,
|
||||
IsPrintingProto: *isPrintingProto,
|
||||
}
|
||||
os.Exit(edit.Buildozer(flag.Args()))
|
||||
os.Exit(edit.Buildozer(opts, flag.Args()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user