Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return code is always 0 (except when it isn't) #85

Closed
rossjones opened this issue Mar 6, 2014 · 1 comment
Closed

Return code is always 0 (except when it isn't) #85

rossjones opened this issue Mar 6, 2014 · 1 comment

Comments

@rossjones
Copy link

Regardless of whether the input is Valid or Invalid, csvlint returns 0. This makes it hard to use it in a script to determine whether the input was valid or not.

> csvlint a_bad.csv; echo $?
> 0

> csvlint unicorn.csv; echo $?
> 0

usage, triggered by csvlint does return 1 as an exit code, but I think it is normal for usage/help to return 0.

> ls --help; echo $?
...
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'ls invocation'
0

> ls -?; echo $?
ls: invalid option -- '?'
Try `ls --help' for more information.
2
@davidread
Copy link

Granted the CLI was only a quick addition, I'll add my vote for these improvements. Plus, it would be great to be able to supply a schema as a parameter. (Note to self: learn Ruby to do these sorts of things myself)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants