sourcegraph / doctree

First-class library documentation for every language (based on tree-sitter), with symbol search & more. Lightweight single binary, run locally or self-host. Surfaces usage examples via Sourcegraph.
https://doctree.org
Apache License 2.0
872 stars 25 forks source link

Respect ignored files (.gitignore) #33

Open Rukenshia opened 2 years ago

Rukenshia commented 2 years ago

I just tried doctree for the first time on a Python project. It's a serverless.com deployed project and I noticed that when I run doctree index ., files in my node_modules directory were indexed as well - this included all the markdown files in the node_modules and some go files that are part of the serverless npm package (some templates from what it looks like).

I didn't find any similar issues yet but I think it generally might be a good idea to not index files in .gitignore, or provide a different mechanism to allow me to ignore certain files or directories.

slimsag commented 2 years ago

Absolutely agree, this is a top priority for me to fix. Thanks for filing the issue!