Skip to content

Should accept a folder/glob as an argument #23

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

Closed
derekprior opened this issue Aug 17, 2012 · 4 comments
Closed

Should accept a folder/glob as an argument #23

derekprior opened this issue Aug 17, 2012 · 4 comments

Comments

@derekprior
Copy link

I'd love to lint multiple json files in a single go, and get a report of each failure, but: jsontlint project/**/*.json doesn't seem to do the job. When linting multiple files it'd probably make sense to not output pretty-printed json when a file passes - simply return the errors.

What do you think?

@zaach
Copy link
Owner

zaach commented Aug 22, 2012

With quiet mode, it's now possible to do this with find, i.e. find . -name "*.json" -exec echo {} \; -exec jsonlint {} -q \;

@zaach zaach closed this as completed Nov 15, 2012
@ghost
Copy link

ghost commented Nov 9, 2015

Hello, the find command is not available on Windows, so to write a portable script that lints JSON files (e.g. an NPM script), one has to write/install a portable find. With the possibility to pass just file names, the task would be much simpler. And for the same reason, it would be nice if the glob expansion would be done by jsonlint and not a shell.

@zaach, would this argument change your mind? There is actually a lot of Node programs that accept globs already (they use minimatch). That's why I think that the request is reasonable.

@keik
Copy link

keik commented Dec 8, 2015

+1

@zaach
Copy link
Owner

zaach commented Jan 15, 2016

PRs would be considered.

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