Fix #28 - Switch from SwiftLint to swift-format - #101
Open
jbuckner wants to merge 3 commits into
Open
Conversation
Bulk reformat with swift-format 6.3.0, plus the config and CI swap. The `rules` dict in .swift-format replaces the toolchain defaults rather than merging with them, so the file carries the full dumped default with only UseTripleSlashForDocumentationComments flipped off. A partial dict silently turns off every rule it doesn't list. The doc-comment rule stays off because the library documents with /** */ blocks throughout; converting those belongs with the DocC work in #55. CI's lint job is pinned to swift:6.3.3 to match the toolchain in Xcode 26.6, since formatting output can shift between swift-format versions. Two names swift-format flags are deliberate and get swift-format-ignore comments: QTime is archive.org's wire name, and reviewer_itemname is a deprecated alias kept for source compatibility. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yqNSBpEowza5teukE2JJL
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yqNSBpEowza5teukE2JJL
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #101 +/- ##
==========================================
+ Coverage 92.55% 92.70% +0.14%
==========================================
Files 13 13
Lines 672 672
==========================================
+ Hits 622 623 +1
+ Misses 50 49 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
CodeQL flagged the workflow for not scoping the token. Every job only reads the repo, and codecov uploads with its own secret, so read is enough. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014yqNSBpEowza5teukE2JJL
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.
Closes #28.
Bulk reformat plus the config and CI swap. No behavior change: a token-level diff of all 28 files comes back identical apart from import reordering, and every string literal is byte-for-byte the same.
Heads up, this needs a settings change to merge.
SwiftLintis a required status check onmainand the job is now calledswift-format, so this PR (and everything after it) blocks on a check that no longer runs. Swap the required context fromSwiftLinttoswift-formatin branch protection.A couple of notes on the config:
rulesdict in.swift-formatreplaces the toolchain defaults instead of merging, so the file carries the full dumped default with one flag flipped. A partial dict silently turns off every rule it does not list.UseTripleSlashForDocumentationCommentsis off. The library documents with/** */blocks throughout and converting all 54 of them belongs with the DocC work in Replace the 2021 jazzy docs with DocC published from CI #55.swift:6.3.3to match Xcode 26.6, since formatting output can shift between swift-format versions.QTimeandreviewer_itemnamegetswift-format-ignorecomments. Both names are deliberate.This lands first because it also unblocks #100: SwiftLint errors on a type body over 350 lines, and the metadata model is about to get a lot bigger than that.
QA
✅
swift test- 126 tests pass✅
swift format lint --strict --recursive InternetArchiveKit InternetArchiveKitTests InternetArchiveKitExample Package.swift- exits 0✅
swift buildand the iOS Simulator build both succeed🤖 Generated with Claude Code
https://claude.ai/code/session_014yqNSBpEowza5teukE2JJL