Skip to content

Honor ADDITIONAL_EXCLUDED_DIRECTORIES in changed-files mode#8362

Merged
nvuillam merged 2 commits into
oxsecurity:mainfrom
trevor-vaughan:fix/8360-additional-excluded-directories
Jul 18, 2026
Merged

Honor ADDITIONAL_EXCLUDED_DIRECTORIES in changed-files mode#8362
nvuillam merged 2 commits into
oxsecurity:mainfrom
trevor-vaughan:fix/8360-additional-excluded-directories

Conversation

@trevor-vaughan

Copy link
Copy Markdown
Contributor

In changed-files mode (VALIDATE_ALL_CODEBASE: false), the file list was
built straight from git diff --name-only without consulting the excluded
directories, so files under EXCLUDED_DIRECTORIES / ADDITIONAL_EXCLUDED_
DIRECTORIES were still linted. Full-codebase mode prunes them during the
os.walk traversal, creating inconsistent behavior between the two paths.

Prune diff files whose ancestor directory is excluded so both modes behave
identically. The matching rule (a directory matches by its basename at any
nesting level, or by its workspace-relative path) is consolidated into a
single _is_excluded_dir() predicate reused by both the git-diff pruning
and the full-codebase os.walk traversal, so the two modes cannot drift.

Closes #8360

Assisted-by: Claude Opus 4.8

@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

In changed-files mode (VALIDATE_ALL_CODEBASE: false), the file list was
built straight from `git diff --name-only` without consulting the excluded
directories, so files under EXCLUDED_DIRECTORIES / ADDITIONAL_EXCLUDED_
DIRECTORIES were still linted. Full-codebase mode prunes them during the
os.walk traversal, creating inconsistent behavior between the two paths.

Prune diff files whose ancestor directory is excluded so both modes behave
identically. The matching rule (a directory matches by its basename at any
nesting level, or by its workspace-relative path) is consolidated into a
single `_is_excluded_dir()` predicate reused by both the git-diff pruning
and the full-codebase os.walk traversal, so the two modes cannot drift.

Closes oxsecurity#8360

Assisted-by: Claude Opus 4.8

@nvuillam nvuillam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks for the PR :)

@nvuillam
nvuillam merged commit 7ae2b4c into oxsecurity:main Jul 18, 2026
10 checks passed
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.

ADDITIONAL_EXCLUDED_DIRECTORIES is ignored when VALIDATE_ALL_CODEBASE: false (changed-files mode)

2 participants