Skip to content

Conversation

@copybara-service
Copy link

Disallow empty value in list.

$ echo "x [a, , b]" | blaze-bin/third_party/txtpbfmt/fmt
parser.Format for path with content "x [a, , b]\n" returned err Empty value in list.
F0428 14:10:56.453731 680717 fmt.go:103] 1 error(s) encountered during execution

Note that this doesn't prevent empty strings:

$ echo "x [a, '' , b]" | blaze-bin/third_party/txtpbfmt/fmt
x [a, "", b]

$ echo "x [a,  , b]" | blaze-bin/third_party/txtpbfmt/fmt
parser.Format for path <stdin> with content "x [a,  , b]\n" returned err Empty value in list.
F0428 14:10:56.453731  680717 fmt.go:103] 1 error(s) encountered during execution

Note that this doesn't prevent empty strings:

$ echo "x [a, '' , b]" | blaze-bin/third_party/txtpbfmt/fmt
x [a, "", b]

PiperOrigin-RevId: 445142675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant