jdx-csv-lint

Crates.iojdx-csv-lint
lib.rsjdx-csv-lint
version1.3.0
sourcesrc
created_at2024-07-26 19:59:02.855922
updated_at2024-08-26 16:30:48.805635
descriptionvalidates csv files
homepage
repositoryhttps://github.com/jdx/jdx-csv-lint
max_upload_size
id1316706
size43,612
(jdx)

documentation

README

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`
Commit count: 0

cargo fmt