twolfson / restructuredtext-lint

reStructuredText linter
The Unlicense
171 stars 20 forks source link

Posibility to pass many rst file or glob pattern #16

Closed pwilczynskiclearcode closed 9 years ago

pwilczynskiclearcode commented 9 years ago

It would be awsome if I could pass pattern or list of patterns instead of one file only:

rst-lint *.rst
rst-lint *.rst docs/source/*rst
rst-lint CHANGES.rst README.rst

I guess help text will look like

usage: rst-lint [-h] [--format FORMAT] [--encoding ENCODING] [path..]

Using proper nargs and glob should do it:

    parser.add_argument('filepath', nargs='*', type=str, help='File to lint')
twolfson commented 9 years ago

Supporting multiple files is a great idea. I don't think glob support is great since:

For nargs, I think we want + since a filepath is always required.

https://docs.python.org/3/library/argparse.html#nargs

Want to open a PR for this?

pwilczynskiclearcode commented 9 years ago

Want to open a PR for this?

Well, I haven't coded anything yet in this matter. Hard to promise.

twolfson commented 9 years ago

I can't tell. Is that a yes or a no? You see to grasp what needs to be done quite well.

pwilczynskiclearcode commented 9 years ago

Ok then, yes.

twolfson commented 9 years ago

This has been resolved by #19 and patched/released in 0.12.0.