Open jamesmelville-gds opened 7 months ago
Had a look at the usage, we sure this is expected behavior we'd want here @jamesmelville-gds?
Seems like the expected usage here is one linting pass per CSV. I imagine it'd be easy to get CSV lint to parse an array of inputs here and go through them in batch...
but then wondering if that breaks the model, are linting responses now to be grouped around an offending file, or clumped into "you've got these problems in that lump". 🤔
Not sure what @Floppy thinks, but perhaps us using bash-fu to enumerate all our CSVs and lint each separately is OK?
Expected Behaviour
When running csvlint in a pre-commit hook pre-commit will pass a list of files to it as seperate args. csvlint should take the list and generate a response for all.
cfn-lint
has an example of this support https://github.com/aws-cloudformation/cfn-lint#basic-usageCurrent Behaviour (for problems)
csvlint errors:
ERROR: "csvlint validate" was called with arguments ["file1.csv", "file2.csv"] Usage: "csvlint myfile.csv OR csvlint http://example.com/myfile.csv"
Steps to Reproduce (for problems)
Use a pre-commit config like:
against files like:
Current workaround is to use xargs to run csvlint against each file: