Skip to content

Commit

Permalink
cmd/cue: mention -c=false in vet's incomplete error
Browse files Browse the repository at this point in the history
This updates the general error message emitted when cue-vet fails
because "some instances are incomplete" by adding a mention of the
-c=false flag that could allow the vet to succeed.

Signed-off-by: Jonathan Matthews <[email protected]>
Change-Id: I21ceec2f6c3c69b17a46633cbb3ee371c946238f
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1208694
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
  • Loading branch information
jpluscplusm authored and mvdan committed Feb 13, 2025
1 parent 8d01019 commit 6fb2a9b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/cue/cmd/testdata/script/issue324.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ a: b: c: *["\(x)"] | _
d: yaml.Marshal(a.b)

-- expect-stderr --
some instances are incomplete; use the -c flag to show errors or suppress this message
some instances are incomplete; use the -c flag to show errors or -c=false to allow incomplete instances
2 changes: 1 addition & 1 deletion cmd/cue/cmd/testdata/script/vet.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
cmp stderr expect-stderr

-- expect-stderr --
some instances are incomplete; use the -c flag to show errors or suppress this message
some instances are incomplete; use the -c flag to show errors or -c=false to allow incomplete instances
-- partial.cue --
package partial

Expand Down
2 changes: 1 addition & 1 deletion cmd/cue/cmd/testdata/script/vet_req.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ x!: string
y: 1
-- expect-stdout1 --
-- expect-stderr1 --
some instances are incomplete; use the -c flag to show errors or suppress this message
some instances are incomplete; use the -c flag to show errors or -c=false to allow incomplete instances
-- expect-stdout2 --
-- expect-stderr2 --
-- expect-stdout3 --
Expand Down
2 changes: 1 addition & 1 deletion cmd/cue/cmd/vet.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func doVet(cmd *Command, args []string) error {
shown = true
p := message.NewPrinter(getLang())
_, _ = p.Fprintln(w,
"some instances are incomplete; use the -c flag to show errors or suppress this message")
"some instances are incomplete; use the -c flag to show errors or -c=false to allow incomplete instances")
}
}
printError(cmd, err)
Expand Down

0 comments on commit 6fb2a9b

Please sign in to comment.