Skip to content

Add **-aware logic to _should_exclude and create unit tests for include/exclude glob edge-cases #280

@filipchristiansen

Description

@filipchristiansen

Background

PR #279 solved Issue #275 by updating _should_include so recursive (**) patterns finally work.

During review two follow-ups were identified:

  1. Exclude logic gap_should_exclude still has a TODO about handling **. Understand if this is needed.
  2. Missing test coverage – There are no unit tests that exercise the full matrix of recursive vs. non-recursive patterns, directory-depth mismatches, or patterns ending in /*.

Leaving these gaps risks regressions and unexpected traversal behaviour.


Tasks

  • Implement ** handling in _should_exclude

    • Understand if this is needed.
  • Design unit-test matrix for glob behaviour

    • Include/Exclude | Recursive (**) vs. Fixed-depth | Ends with /* | Depth overflow.
  • Add negative tests ensuring that directory paths are not emitted when no files under them match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions