Repository navigation
chore(ci): switch lint to the toolchain's swift-format - #5
Merged
Merged
Conversation
Replace the externally-built SwiftFormat (nicklockwood/SwiftFormat 0.60.1, cloned and compiled in CI) with the swift-format that ships inside the Swift toolchain. The lint job now just runs `swift-format lint -r Sources Tests` in the existing swift:6.3 container, dropping the cache + install steps. - Add .swift-format (JSON) mapped from the old .swiftformat rules while preserving the current style (NoAccessLevelOnExtensionDeclaration off so 'public extension' blocks are left as-is). - Remove .swiftformat. - Reformat Sources/ and Tests/ to the new formatter. - Point agent docs and copilot instructions at the new command/config.
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.
Summary
Replaces the externally-built SwiftFormat (nicklockwood/SwiftFormat 0.60.1, cloned and compiled from source in CI) with the swift-format that ships inside the Swift toolchain. No more cache + clone +
swift build -c releaseinstall dance — the lint job just runs the toolchain'sswift-format.Changes
.github/workflows/ci.yml): theswift-format Lintjob now runsswift-format lint --strict -r Sources/ Tests/inside the existingswift:6.3container; removed the SwiftFormat cache/install steps..swift-format(JSON), mapped from the old.swiftformatrules while preserving the current code style. Removed.swiftformat.Sources/andTests/to the new formatter (173 files).Tools/AdwaitaCodeGen): the pointer+GValuesignal template now wraps the first pointer in its concrete Swift type (e.g.TabPage) and uses the typedSignalName, so regenerating + formatting reproduces the checked-inSources/Adwaita/Generated/signal methods. Removed a dead// swiftformat:disabledirective from theSpinRowtemplate.copilot-instructions.mdandREUSE.tomlto reference the new tool/config; added a Formatting section toCONTRIBUTING.md.Notes
NoAccessLevelOnExtensionDeclarationis off, so existingpublic extension X { … }blocks are left untouched (swift-format's default would have moved the access level onto every member).--wrap* preserveequivalent exists).--strictand the format is idempotent; build + full test suite pass locally.Verification
swift build✅xvfb-run swift test --no-parallel✅ (1332 tests)swift-format lint --strict -r Sources/ Tests/✅ (clean, also verified inside theswift:6.3container)