Skip to content

fix(analyze): honor gitignore files - #128

Merged
smiggleworth merged 1 commit into
mainfrom
fix/analyze-gitignore
Aug 29, 2026
Merged

fix(analyze): honor gitignore files#128
smiggleworth merged 1 commit into
mainfrom
fix/analyze-gitignore

Conversation

@smiggleworth

@smiggleworth smiggleworth commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Closes #127

What changed

  • honor project-root and nested .gitignore files during analyzer discovery
  • apply the same ignore hierarchy to files explicitly included by TypeScript configuration
  • preserve nested negation rules and keep askr.analyze.exclude as an additive analyzer-only filter
  • exercise the behavior through both analyzer fixtures and the packed CLI candidate
  • document discovery behavior and add the typed ignore 7.0.6 runtime dependency

Compatibility

This changes analyzer discovery only: gitignored source files are no longer diagnosed by default. There is no public API or flag change, and existing askr.analyze.exclude configuration remains supported. The package version remains 0.2.3; no package was published.

TDD evidence

Before the implementation, the regression reported all seven explicitly included fixture files, including ignored root, nested, and legacy-tree files. After the implementation, it reports only the three non-ignored/re-included files. A nested-workspace regression also proves project-root rules apply below the selected workspace.

Validation

  • focused .gitignore regressions: 2 passed, three consecutive runs
  • npm run check: 20 files / 276 tests; lint, typecheck, coverage, changelog, build, docs, publint, and pack all passed
  • npm run test:peer-floor: packed CLI candidate passed against the minimum supported Askr peer and excluded an ignored source file
  • npm run test:templates: all packed templates passed
  • npm run bench:analyze: 50 files 43.396 ms, 250 files 199.77 ms, five workspaces 210.57 ms; all thresholds passed
  • git diff --check: passed

Dependency review

The lockfile adds only ignore 7.0.6 and its root dependency entry. npm outdated reports only @types/node 26.4.0; it is a minor update from 26.3.0 and is intentionally excluded.

Hosted validation

CI run 33247571500 passed on the exact head SHA 4f68432b3532a99b46148754b2d8482694ef8ab9: dependency audit, Ubuntu, Windows, macOS, packed minimum-peer, packed templates, and performance gate all succeeded. Two complete main...head review passes found no remaining defects, and GitHub readback found no comments, reviews, or unresolved threads.

@smiggleworth
smiggleworth marked this pull request as ready for review August 29, 2026 10:22
Copilot AI lite review requested due to automatic review settings August 29, 2026 10:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@smiggleworth
smiggleworth merged commit e10ab31 into main Aug 29, 2026
7 checks passed
@smiggleworth
smiggleworth deleted the fix/analyze-gitignore branch August 29, 2026 10:22
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.

analyze: file walker doesn't respect .gitignore

2 participants