Skip to content

Support ignore patterns #28

@sobeaa

Description

@sobeaa

code-slicer should support ignoring files by pattern.

Expected behavior:

  • accept multiple ignore patterns
  • exclude a file if any pattern matches
  • apply ignores consistently during traversal and output generation
  • keep current behavior unchanged when no ignore patterns are provided

Example:

code-slicer src/main.ts --ignore "**/*.test.ts" --ignore "src/generated/**"

Possible config shape:

type Options = {
  ignore?: readonly string[];
};

Acceptance criteria:

  • multiple ignore patterns are supported
  • matching files are not included in output
  • matching directories are not traversed
  • non-matching files are unaffected
  • tests cover one pattern, multiple patterns, and overlapping patterns

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions