6 releases (stable)
1.3.0 | Aug 26, 2024 |
---|---|
1.2.0 | Aug 1, 2024 |
1.1.0 | Jul 30, 2024 |
0.1.1 | Jul 26, 2024 |
#469 in Command line utilities
359 downloads per month
15KB
347 lines
a basic csv linter
Installation
Install rust/cargo then install this CLI:
cargo install jdx-csv-lint
Usage
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
Checks
Enable specific checks with --checks
:
$ jdx-csv-lint --checks email examples/data/good.csv
### `email`
Dependencies
~10–38MB
~575K SLoC