jednano / eclint

Validate or fix code that doesn't adhere to EditorConfig settings or infer settings from existing code.
MIT License
305 stars 28 forks source link

Support directories on command line #83

Closed silverwind closed 7 years ago

silverwind commented 7 years ago

It'd be neat if one could pass a directory and files inside would get enumerated. For example

├── dir
│   ├── file1.txt
│   ├── file2.txt

eclint check dir should check both files. Currently it does nothing in this case.

silverwind commented 7 years ago

eclint check dir/*/

This won't work if the user has extended globbing globstar disabled in their shell. Another issue with the **/* expansion is that there's the issues that globs like this can easily reach the shell's maximum command length, which, depending on environment can be as short as 32000 characters.

gucong3000 commented 7 years ago

eclint check "dir/**/*" or just eclint check

gucong3000 commented 7 years ago

Globs support by vinyl-fs

silverwind commented 7 years ago

Okay, so eclint check 'dir/**/*' should work without shell globbing. Still I think it'd be nice to support directories directly, eslint does support it too.

gucong3000 commented 7 years ago

PR is welcome.