Skip to content

fix: exclude SwiftPM .build/.swiftpm from scanning (0.7.1) - #29

Merged
tizz98 merged 1 commit into
mainfrom
fix/swift-build-exclusions
Jul 18, 2026
Merged

fix: exclude SwiftPM .build/.swiftpm from scanning (0.7.1)#29
tizz98 merged 1 commit into
mainfrom
fix/swift-build-exclusions

Conversation

@tizz98

@tizz98 tizz98 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Fast-follow to the 0.7.0 swift profile.

Problem

The rule engine's EXCLUDED_DIRS covered target/node_modules/build but not SwiftPM's .build/ (or .swiftpm/). After a local swift build, meta check/meta arch scanned generated Swift under .build/ as product code — e.g. a bogus oversized-files WATCH on .build/.../runner.swift. Local-only (CI checks out fresh / runs standards before building), but a real correctness gap: under check --strict a generated file with a flagged pattern could falsely fail.

Fix

  • grep.rs: add .build and .swiftpm to EXCLUDED_DIRS.
  • scaffold.rs: the generated .gitignore is now profile-aware — swift repos ignore .build/ and .swiftpm/ out of the box (init/upgrade merge them in).

Verification

  • New tests: .build/.swiftpm exclusion in collect_files; swift .gitignore contents. 129 lib + 8 integration + 6 stats pass.
  • Confirmed against a real repo: meta arch on a Swift package with a populated .build/ went from 1 watch (false) → 0 watch.

Bumps to 0.7.1.

🤖 Generated with Claude Code

…gnore

The rule engine scanned SwiftPM's `.build/` (and `.swiftpm/`) as product code,
so after a local `swift build`, `meta check`/`meta arch` reported false findings
on generated Swift (e.g. a bogus oversized-files watch on `.build/.../runner.swift`).

- grep.rs: add `.build` and `.swiftpm` to EXCLUDED_DIRS.
- scaffold.rs: the generated `.gitignore` is now profile-aware — swift repos
  ignore `.build/` and `.swiftpm/` out of the box (init/upgrade merge them in).

Tests: `.build`/`.swiftpm` exclusion in collect_files; swift `.gitignore` contents.
Bumps to 0.7.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tizz98
tizz98 merged commit 75768bc into main Jul 18, 2026
4 checks passed
@tizz98
tizz98 deleted the fix/swift-build-exclusions branch July 18, 2026 00:14
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