Skip to content

feat(index): honor ignore.files — exclude matched files from indexing - #530

Merged
ajianaz merged 3 commits into
developfrom
feat/521-index-ignore-files
Aug 27, 2026
Merged

feat(index): honor ignore.files — exclude matched files from indexing#530
ajianaz merged 3 commits into
developfrom
feat/521-index-ignore-files

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Fixes #521

What

  • index_project_with_id now excludes files matching skip patterns (glob matching via should_skip_file) before reading them; new IndexStats.files_excluded reports the count
  • cora index / watch merge review's ignore.files with index.skip_files, so one ignore list governs scan, index, and dead-code alike
  • cora scan passes the merged list to its index-based findings stage too

Config-hash invalidation already wipes prior state when the pattern list changes, so newly excluded files are purged on the next run.

Why

Skip patterns only invalidated fingerprints; the walker still indexed every matching file, so dead-code and review's index scanners reported ~90 false positives per run from examples/ and extensions/ on uteke even with .cora.yaml ignore.files configured.

Testing

  • Regression test: exclusion of matched files + purge-on-new-pattern via hash invalidation
  • Full suite green; fmt clean; zero new clippy findings vs develop

All commits signed-off (DCO).

skip patterns only invalidated fingerprints; the walker still indexed
every matching file, so dead-code and review's index scanners reported
~90 false positives per run from examples/ and extensions/ on uteke even
with .cora.yaml ignore.files configured (#521).

- index_project_with_id now excludes files matching skip patterns
  (should_skip_file glob matching) before reading them; new
  IndexStats.files_excluded reports the count
- cora index / watch merge review's ignore.files with index.skip_files,
  so one ignore list governs scan, index, and dead-code alike
- cora scan passes the merged list to its index-based findings stage too

Config-hash invalidation already wipes prior state when the pattern list
changes, so newly excluded files are purged on the next run. Regression
test covers exclusion plus purge-on-new-pattern.

Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
@ajianaz ajianaz closed this Aug 27, 2026
@ajianaz ajianaz reopened this Aug 27, 2026
Signed-off-by: Anaz S. Aji <aji.anaz@gmail.com>
Signed-off-by: Anaz S. Aji <aji.anaz@gmail.com>

# Conflicts:
#	src/main.rs
@ajianaz
ajianaz merged commit 184a774 into develop Aug 27, 2026
15 checks passed
@ajianaz
ajianaz deleted the feat/521-index-ignore-files branch August 27, 2026 13:16
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.

dead-code: respect .cora.yaml ignore.files (examples/, extensions/, tests)

1 participant