Skip to content
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

feature request: programmatic way to ignore file paths #66

Open
mr-cal opened this issue Jun 16, 2023 · 2 comments
Open

feature request: programmatic way to ignore file paths #66

mr-cal opened this issue Jun 16, 2023 · 2 comments

Comments

@mr-cal
Copy link

mr-cal commented Jun 16, 2023

We ignore many common directories that contain rst files in our python projects. e.g. sphinx-lint --ignore docs/_build --ignore .tox --ignore .venv --ignore venv

It would be nice to have a more programmatic way to ignore file paths.

Options

  • New flag --gitignore - ignore subdir or file paths in a .gitignore
  • New flag --ignore-hidden - do not lint hidden subdir or file paths
  • Globbing support for --ignore
@mr-cal
Copy link
Author

mr-cal commented Jun 22, 2023

I ended up using git ls-files to accomplish the same result:

canonical/starbase@0f6657d#diff-ef2cef9f88b4fe09ca3082140e67f5ad34fb65fb6e228f119d3812261ae51449R119-R128

@JulienPalard
Copy link
Collaborator

I won't be against a --ignore-file option taking the path of a .gitignore-like file, but I'm having issues with Python's gitignore parser: mherrmann/gitignore_parser#43

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

2 participants