Skip to content

default excludes not applied for paths below the invocation dir #973

Description

@jshwi

The default exclude patterns are anchored to the start of the path as given, so they only match when the excluded directory sits directly under the current working directory. Checking a subdirectory or an absolute path descends into venvs, __pycache__, and other directories that should be excluded.

Reproducer — given a tree:

proj/
  .venv/file.py
  __pycache__/file.py
$ docsig proj
$ docsig /abs/path/to/proj

Both descend into .venv/ and report errors for files that the default excludes are meant to skip. Only docsig . run from inside proj/ behaves correctly.

Expected: the default excludes apply however the checked path is given — relative, a subdirectory, or absolute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions