Skip to content

feat: add .nomonicignore config file support - #9

Merged
larkiny merged 6 commits into
mainfrom
feat/nomonicignore
Feb 2, 2026
Merged

feat: add .nomonicignore config file support#9
larkiny merged 6 commits into
mainfrom
feat/nomonicignore

Conversation

@larkiny

@larkiny larkiny commented Feb 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds .nomonicignore file support for excluding paths from BIP39 scanning
  • Gitignore-style glob patterns: *, **, ?, anchored /, directory trailing /
  • Works across all 4 entry points: check-staged.ts, scan-repo.ts, check-bip39-seeds.sh, scan-repo.sh
  • Scan tools (scan-repo.ts, scan-repo.sh) also accept --ignore <pattern> CLI flag
  • Zero new dependencies — glob-to-regex compiled in-house
  • Installer now hints about .nomonicignore in success output

Example .nomonicignore

# Skip Drizzle migration files
drizzle/migrations/**

# Skip all SQL files
*.sql

# Skip vendor directory
vendor/

Test plan

  • 15 new unit tests for glob matching (ts/ignore.test.ts)
  • All 77 tests pass
  • Lint and format checks pass
  • Manual test: .nomonicignore with drizzle/migrations/* skips migration files
  • --ignore CLI flag works with scan-repo.sh

Larkin Young added 6 commits February 2, 2026 13:59
New ts/ignore.ts module with:
- loadIgnorePatterns() reads .nomonicignore from repo root
- compilePattern() converts gitignore-style globs to RegExp
- isIgnored() tests file paths against compiled patterns

Supports *, **, ?, anchored (leading /), and directory (trailing /)
patterns. Zero dependencies.
check-staged.ts filters staged files against ignore patterns.
scan-repo.ts adds --ignore <pattern> CLI flag and filters file list.
Both bash scripts read .nomonicignore and skip matching paths.
scan-repo.sh also accepts --ignore <pattern> CLI flag.
Normalizes paths (strips ./ and --dir prefix) for reliable matching.
Scan-repo --dir mode now tries git ls-files scoped to the target
directory first, which automatically respects .gitignore rules.
Falls back to recursive find/readdir if not inside a git repo.
@larkiny
larkiny merged commit 80b8b04 into main Feb 2, 2026
4 checks passed
@larkiny
larkiny deleted the feat/nomonicignore branch February 2, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant