Skip to content

fix: keep excluded and git-ignored paths out of findings - #914

Open
zlum wants to merge 1 commit into
peteromallet:mainfrom
zlum:fix/respect-excludes
Open

zlum wants to merge 1 commit into
peteromallet:mainfrom
zlum:fix/respect-excludes

Conversation

@zlum

@zlum zlum commented Oct 30, 2026

Copy link
Copy Markdown

Problem

  • External tool phases (e.g. ktlint) walk the tree themselves and reported files under excluded paths. In my case that was copies of the code in nested git worktrees under an excluded .claude/worktrees, which duplicated every lint finding.
  • The stale-exclude audit flagged excluded directories that git ignores (.idea, tool state, local test data, nested worktrees). Those aren't project code, so excluding them is never stale.

Fix

  • make_tool_phase drops entries matching the default, configured or language exclusions, normalizing paths exactly as make_issue does.
  • audit_excluded_dirs skips directories that git check-ignore reports. The new git_ignored_paths helper uses --stdin -z, because text mode sends \r\n on Windows and git then looks up path\r.

Tested: new tests pass; the full suite on Windows has the same 32 failures as main (path/CRLF issues unrelated to this change). Verified against a real Android app (Kotlin, 113 production files).

🤖 Generated with Claude Code

- External tool phases (ktlint, linters) walk the tree themselves and
  reported files in excluded paths, e.g. copies of the code in nested git
  worktrees. Drop entries matching the default, configured or language
  exclusions, using the same path normalization as make_issue.
- The stale-exclude audit flagged excluded directories that git ignores
  (.idea, tool state, local test data, nested worktrees). Those are not
  project code, so excluding them is never stale; skip them via
  `git check-ignore -z` (NUL-separated, since text mode sends "\r\n"
  on Windows).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot added a commit to citizenadam/desloppify that referenced this pull request Oct 30, 2026

This branch has not been deployed

No deployments
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.

1 participant