mirror of
https://github.com/johnkerl/miller.git
synced 2026-08-04 13:33:18 +00:00
Trailing blank lines at the end of a CSV/TSV file produce a header/data length mismatch error which, especially for large files, gives no clue that the offending line is simply blank. Since #2146 (issue #1535), the skip-trivial-records verb is an opt-in way to have such lines skipped -- but users hitting the error had no pointer to it. Now, when the mismatching input line is blank, the CSV and TSV readers append a hint to the error message: mlr: CSV header/data length mismatch 2 != 1 at filename tmp.csv row 4; this input line is blank -- use the skip-trivial-records verb to have blank input lines skipped Errors for genuinely ragged, non-blank lines are unchanged, as is all non-error behavior. Also adds a note to the CSV/JSON troubleshooting docs page about trailing blank lines and skip-trivial-records. Addresses #1572. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| constants.go | ||
| doc.go | ||
| fixed_width_splitter.go | ||
| fixed_width_splitter_test.go | ||
| line_reader.go | ||
| pseudo_reader_gen.go | ||
| README.md | ||
| record_reader.go | ||
| record_reader_benchmark_test.go | ||
| record_reader_csv.go | ||
| record_reader_csvlite.go | ||
| record_reader_dcf.go | ||
| record_reader_dkvp_nidx.go | ||
| record_reader_dkvp_test.go | ||
| record_reader_dkvpx.go | ||
| record_reader_dkvpx_test.go | ||
| record_reader_factory.go | ||
| record_reader_json.go | ||
| record_reader_markdown.go | ||
| record_reader_pprint.go | ||
| record_reader_tsv.go | ||
| record_reader_xtab.go | ||
| record_reader_yaml.go | ||
| splitters.go | ||
Logic for parsing disk-file/standard-input byte streams into records.
There is one record-reader type per supported input file format, and a factory method.