Repository navigation
fix(ignore): scope default vendor exclusions to dependency manifests - #1081
azizur100389 wants to merge 5 commits into
Conversation
code-review-graph reviewOverall risk: 0.55 (MEDIUM) — 13 changed function(s)/class(es), 39 affected flow(s), 3 test gap(s) (1 with no tested caller found, 2 reached only through a caller) Risk-scored changes
Affected execution flows
Test gaps
Reached only through a callerNo test names these directly, but a tested caller reaches them along the call path shown. That is a path in the call graph, not a record of execution -- the caller's tests may never take this branch. Treat it as where to look, not as coverage: these count as gaps and are scored as untested.
Powered by code-review-graph — local-first analysis; no code leaves the CI runner. |
|
Thank you for this PR. I tested it with real repos, builds and watch mode. The Java vendor fix works well. Before I can merge it, please fix these:
One fix may cover 1 and 2. Treat vendor/ next to composer.json, go.mod or Gemfile as dependencies. This works like target/ next to pom.xml. After you push the fix, I will test it again. |
|
Hi @tirth8205, the review issues have been fixed and pushed, with regression tests covering the reported cases. Nested vendor directories next to dependency manifests are now excluded consistently in watch mode and import resolution. Manifest changes also invalidate the cached scan, including deletion of a root Gemfile. I rechecked CI today: all 17 checks are passing, with the upgrade-path check intentionally skipped. The branch is also up to date with staging and has no merge conflicts. Could you please retest the updated PR when you have a chance? Thank you! |
Linked issue
Closes #1056.
What & why
The unconditional vendor default hides legitimate source packages in repositories that do not use vendor for dependencies, with no way to override it. Apply that default only to Composer, Go, and Ruby projects identified by root manifests (composer.json, go.mod, go.work, Gemfile, Rakefile, or *.gemspec). Explicit vendor/ entries in .code-review-graphignore still work, as do all other defaults. Keep DEFAULT_IGNORE_PATTERNS intact and document the repository-aware behavior.
How it was tested
Following the same staged regression/baseline methodology used in my earlier PRs (#274, #276, #279, #353 and #354), against the current contribution target
stagingat6b12d11625cbec3b6773e076cb3d136464fa90e5.ruff check code_review_graph tests/test_composer_vendor_ignore.py: clean.bandit -r code_review_graph/ -c pyproject.toml: zero findings.mypy code_review_graph/ --ignore-missing-imports --no-strict-optional: the same three existing Windowsfcntl.LOCK_EX/LOCK_NB/flockerrors indaemon.pyas unchanged staging; no new errors.Exact test commands (using a local virtual environment with
.[dev], asuvis not installed):Full local Windows suite completed: 4,154 passed, 110 failed, 819 skipped, 46 deselected, 2 xfailed, 2 xpassed; 86% coverage. Unchanged staging: 4,143 passed, 110 failed, with identical skip/xfail/xpass counts. Failure identities match unchanged staging exactly; no new failures. The Git ceiling isolates temporary test repositories from an unrelated enclosing home-directory Git repository; PATH/PYTHONPATH point to each checkout under test. Browser tests passed in CI; browser and opt-in upgrade suites were excluded locally.