feat(index): honor ignore.files — exclude matched files from indexing - #530
Merged
Conversation
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>
Signed-off-by: Anaz S. Aji <aji.anaz@gmail.com>
Signed-off-by: Anaz S. Aji <aji.anaz@gmail.com> # Conflicts: # src/main.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #521
What
index_project_with_idnow excludes files matching skip patterns (glob matching viashould_skip_file) before reading them; newIndexStats.files_excludedreports the countcora index/watchmerge review'signore.fileswithindex.skip_files, so one ignore list governs scan, index, and dead-code alikecora scanpasses the merged list to its index-based findings stage tooConfig-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/andextensions/on uteke even with.cora.yamlignore.filesconfigured.Testing
All commits signed-off (DCO).