Should accept a folder/glob as an argument #23

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

Comments

Projects
None yet
4 participants

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?

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 closed this Nov 15, 2012

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 commented Dec 8, 2015

+1

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