Skip to content

Nested dependency dirs not ignored + missing framework patterns in defaults #91

@E-ChintanGohil

Description

@E-ChintanGohil

Problem

1. _should_ignore doesn't match nested paths

The current _should_ignore uses only fnmatch.fnmatch(path, pattern) which matches from the start of the path. For a pattern like node_modules/**:

  • node_modules/react/index.jsmatched (starts with node_modules/)
  • packages/app/node_modules/react/index.jsNOT matched

This means in monorepos, workspaces, or any project with nested dependency directories, the graph parses thousands of third-party files — inflating build time and polluting blast radius results.

2. Missing framework patterns in DEFAULT_IGNORE_PATTERNS

Only JS/Python/Rust ecosystems are covered. Common frameworks missing:

Framework Missing pattern What it contains
PHP/Laravel/Composer vendor/** Hundreds of Composer packages
Laravel storage/** Logs, cache, compiled views
Laravel bootstrap/cache/** Compiled config/routes
Laravel public/build/** Vite/Mix compiled assets
Ruby/Rails vendor/bundle/**, .bundle/** Gem dependencies
Java/Kotlin .gradle/**, *.jar Gradle cache, compiled JARs
.NET/C# bin/**, obj/**, packages/** Build outputs, NuGet packages
Dart/Flutter .dart_tool/**, .pub-cache/** Package cache
General coverage/**, .cache/**, tmp/** Test coverage, caches

Users currently need to create a .code-review-graphignore file per project to exclude these.

Fix

PR #__ (will link) addresses both:

  1. Updated _should_ignore to check path segments (any part matching the prefix)
  2. Extended DEFAULT_IGNORE_PATTERNS with common framework patterns

Tests included for nested paths and framework-specific patterns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions