Skip to content

New directory walking should ignore hidden folders #49

Description

@peterjc

I was looking forward to the new directory parsing functionality added in v1.2 to close #38, however it does not work well if you have hidden folders like .tox present. I would expect .venv would be another common problem case.

$ rst-lint --version
1.2.1
$ rst-lint --level warning .
SEVERE ./.tox/style/lib/python2.7/site-packages/restructuredtext_lint/test/test_files/invalid_line_mismatch.rst:1 Title overline & underline mismatch.
WARNING ./.tox/style/lib/python2.7/site-packages/restructuredtext_lint/test/test_files/invalid.rst:2 Title underline too short.
WARNING ./.tox/style/lib/python2.7/site-packages/restructuredtext_lint/test/test_files/second_short_heading.rst:6 Title underline too short.
WARNING ./.tox/style/lib/python2.7/site-packages/restructuredtext_lint/test/test_files/second_short_heading.rst:6 Title underline too short.
ERROR ./.tox/style/lib/python2.7/site-packages/restructuredtext_lint/test/test_files/invalid_link.rst:None Anonymous hyperlink mismatch: 1 references but 0 targets.
See "backrefs" attribute for IDs.
ERROR ./.tox/style/lib/python2.7/site-packages/restructuredtext_lint/test/test_files/invalid_target.rst:1 Unknown target name: "fork me on github <https://github.com/evvers/git-pre-commit-hook".

I would suggest that the recursion ignore hidden folders by default (leading .), and possibly also any hidden RST files too?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions