Repository navigation
feat(yq): --properties-separator, --properties-array-brackets and --csv-separator for -o - #6940
Conversation
CoverageTotal: 92.98% ⚪ 0 pp vs Comparing No per-file coverage changes vs 🔇 0 ignored region(s), 682 tolerated region(s)
642 more not shown: the full report is in the Touched files absent from every coverage report (4)
These files may contain no executable code or may have been omitted from the coverage run. Patch coveragePatch: 100% (51/51 new lines covered)
|
CoverageTotal: 93.03% ⚪ 0 pp vs Comparing No per-file coverage changes vs 🔇 0 ignored region(s), 681 tolerated region(s)
641 more not shown: the full report is in the Touched files absent from every coverage report (4)
These files may contain no executable code or may have been omitted from the coverage run. Patch coveragePatch: 100% (51/51 new lines covered)
|
Summary
Adds the three option flags of yq's
propsandcsvoutput formats to the-oencoders merged with the first output-format slice:--properties-separator(an empty value keeps the default=),--properties-array-brackets(a[0]for an array element below the root) and--csv-separator(one byte; yq's own refusals of a longer value and of", a line break and NUL are reproduced, including its object branch dropping the delimiter error).-o=tsvignores--csv-separator, as yq does.This is only part of issue 6922: the
@propsand@csvoperators still ignore the flags here, and apropscomment is still not written, so the issue stays open.Test plan
cargo test --features cli,simd,regex,serde(14,592 passed before the last two review fixes;tests/yq_cli/i6922.rsrerun after them), both clippy invocations,cargo check --no-default-features,cargo test --no-default-features --lib, rustdoc-D warnings, fmt, changelog and doc-lines checksprops,csvandtsv; the only differences are the known "output before an encoder error" class