feat: native swift profile (ships as 0.7.0) - #28
Merged
Conversation
Adds a first-class `swift` profile alongside rust/typescript/python/generic. - ProfileKind::Swift wired through parse/name/for_kind and every exhaustive match (detect, scaffold, guards, signals). - src/profile/swift.rs: SwiftPM defaults (swift build/test, coverage via --enable-code-coverage), .swift sources, language-agnostic signals with a Swift fragility pattern (try!/as!/fatalError/unsafelyUnwrapped), and the no-print-in-lib + deps-justified guards. - detect.rs: Package.swift -> SwiftPM (Sources/* domains); *.xcodeproj / *.xcworkspace -> Xcode-flavored with an xcodebuild note. - CI is now runner-aware: generated ci.yml runs on macos-latest for swift (Xcode/Swift preinstalled, no toolchain step); other profiles stay on ubuntu-latest. meta-check/arch stay on Linux (grep-only). - deps-justified understands SwiftPM: extracts .package(url:) names from Package.swift. - Tests across profile/detect/scaffold/guards + a swift init integration test. Bumps to 0.7.0 to ship the new profile. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tizz98
force-pushed
the
feat/swift-profile
branch
from
July 17, 2026 23:33
735cdce to
5f270b6
Compare
Addresses adversarial review findings on the new swift profile: - is_test_path now recognizes SwiftPM/XCTest conventions (capital-T `Tests/` dir, `<Name>Tests.swift`), so Swift test files are excluded from guards and arch signals — no more false no-print-in-lib failures under `check --strict` or bogus fragility tickets on `try!` in test setup. - swift_deps skips whole-line `//` comments so a commented-out `.package(url:)` isn't counted as a declared dependency. - Swift fragility signal also flags preconditionFailure( / assertionFailure(. Tests: is_test_path swift cases, a no-print-in-lib Tests/ exclusion test, and a commented-dep case in the swift deps test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native Swift profile (ships as 0.7.0)
Adds a first-class
swiftprofile so Swift/SwiftPM repos get proper defaults instead of falling back togeneric.What's new
ProfileKind::Swiftacross parse/name/for_kind + every exhaustive match (detect, scaffold, guards, signals).src/profile/swift.rs: SwiftPM defaults —swift build/swift test, coverage viaswift test --enable-code-coverage,.swiftsources, language-agnostic signals with a Swift fragility pattern (try!/as!/fatalError(/.unsafelyUnwrapped), guardsno-print-in-lib+deps-justified.Package.swift→ SwiftPM (Sources/*domains);*.xcodeproj/*.xcworkspace→ Xcode-flavored with anxcodebuildnote.ci.ymlruns onmacos-latestfor swift (Xcode + Swift preinstalled — no toolchain step); every other profile stays onubuntu-latest.meta-check/archstay on Linux (grep-only).deps-justifiednow understands SwiftPM: extracts.package(url:)dependency names fromPackage.swift.Tests
Unit tests across profile/detect/scaffold/guards + a
meta init --profile swiftintegration test assertingmacos-latestCI.cargo fmt/clippy -D warnings/testandcargo run -- check --strictall green.Bumps to 0.7.0 — merging to
maintriggers the release workflow (auto-tagv0.7.0+ publish binaries incl.aarch64-apple-darwin).🤖 Generated with Claude Code