Skip to content

Conversation

@james-snyk
Copy link
Contributor

  • Tests written and linted ℹ︎
  • Documentation written ℹ︎
  • Commit history is tidy ℹ︎

What this does

New discovery package provides efficient, flexible file discovery utilities for finding manifest and configuration files across directory trees.

Features

  • Multiple search modes: Find specific files by path OR match glob patterns OR combine both
  • Exclude patterns: Skip directories/files with glob patterns (e.g., node_modules, .venv)
  • Smart behavior:
    • Target files are path-specific (not recursive)
    • Include globs search recursively
    • Automatic deduplication when criteria overlap
    • Errors when target file not found
  • Context support: Cancellable operations for large directory traversals

@james-snyk james-snyk requested review from a team as code owners November 20, 2025 10:10
@snyk-io
Copy link

snyk-io bot commented Nov 20, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

- **Exclude Patterns**: Skip directories and files using glob patterns
- **Context Support**: Cancellable operations for long-running searches
- **Efficient Traversal**: Uses `filepath.WalkDir` for optimal performance
- **Symlink Handling**: Optional symlink following

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also please remove docs about symlink?

@james-snyk james-snyk merged commit 41acc5c into main Nov 24, 2025
14 checks passed
@james-snyk james-snyk deleted the feat/file-discovery branch November 24, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants