Skip to content

fix: add skip list for index scanners to reduce false positives on entry-point files #447

Closed

Description

@ajianaz

Problem

Index scanners (unused-imports, dead-code) produce false positives on bundler entry-point and config files (e.g. vitest.config.ts, src/main.ts). These files have imports used by the bundler (Vite, Webpack) — not direct code references.

Solution

Add index_skip_files field to RulesConfig with sensible defaults for common entry-point patterns:

  • *.config.ts, *.config.js, *.config.mjs
  • src/main.ts, src/main.js, src/index.ts
  • Entry files used by bundlers

The skip list is applied in index_scanner.rs to filter out findings from matching files before returning results.

Scope

  • Patch RulesConfig — add index_skip_files: Vec<String> with defaults
  • Patch scan_unused_imports(), scan_dead_code_in_review(), scan_breaking_changes(), scan_project_index() — filter before push
  • Add tests for skip list filtering
  • Update CHANGELOG.md

Version

Patch (0.11.1)

Activity

  1. self-assigned this
    on Aug 1, 2026
  2. added
    bug
    enhancement
    on Aug 1, 2026
  3. added 2 commits that reference this issue on Aug 1, 2026
    e3b9195
    899ac6f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions