Crates.io | jdx-csv-lint |
lib.rs | jdx-csv-lint |
version | 1.3.0 |
source | src |
created_at | 2024-07-26 19:59:02.855922 |
updated_at | 2024-08-26 16:30:48.805635 |
description | validates csv files |
homepage | |
repository | https://github.com/jdx/jdx-csv-lint |
max_upload_size | |
id | 1316706 |
size | 43,612 |
a basic csv linter
Install rust/cargo then install this CLI:
cargo install jdx-csv-lint
To do a basic run with minimal checks:
$ jdx-csv-lint examples/data/bad.csv
CSV error: record 100 (line: 100, byte: 1599): found record with 13 fields, but the previous record has 12 fields
To do a run with all checks enabled:
$ jdx-csv-lint --all-checks examples/data/bad_email.csv
[ERROR jdx_csv_lint::linter] Parse error: examples/data/bad_email.csv[4]: (3,INVALID@INVALID@INVALID.INVALID,foo1@INVALID.INVALID) Invalid email address: INVALID@INVALID@INVALID.INVALID
[ERROR jdx_csv_lint::linter] Parse error: examples/data/bad_email.csv[5]: (4,foo2@bar.com,INVALID@INVALID@INVALID.INVALID) Invalid email address: INVALID@INVALID@INVALID.INVALID
[ERROR jdx_csv_lint] examples/data/bad_email.csv is invalid
See options with --help
:
jdx-csv-lint --help
Enable specific checks with --checks
:
$ jdx-csv-lint --checks email examples/data/good.csv
### `email`