Skip to content

ci: adopt swift-format + warnings/doc-link gates#325

Merged
3lvis merged 1 commit into
masterfrom
ci/swift-format-and-gates
Jun 20, 2026
Merged

ci: adopt swift-format + warnings/doc-link gates#325
3lvis merged 1 commit into
masterfrom
ci/swift-format-and-gates

Conversation

@3lvis

@3lvis 3lvis commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Borrows the swift-format and CI tooling from SwiftSync and adapts it to this repo (single package, go-httpbin-backed tests).

What's added

  • .swift-format — shared config (120 cols, 4-space indentation).
  • pre-commit hook (.githooks/pre-commit) that formats staged Swift files; enable once per clone with ./scripts/setup.sh.
  • CI jobs (.github/workflows/ci.yml):
    • swift-format checkswift format --in-place --recursive Sources Tests then git diff --exit-code.
    • Warnings gate — fresh swift build --build-tests (no cache), fails on any first-party warning:.
    • Doc link checkscripts/check-doc-links.py fails on dead relative markdown links.
    • existing build & test job (against local go-httpbin) retained.
  • Reformat of Sources/ and Tests/ to satisfy the format check.

Verified locally

  • swift format --in-place --recursive Sources Tests is idempotent (format check passes).
  • swift build --build-tests clean, no first-party warnings.
  • scripts/check-doc-links.py: OK across 10 markdown files.
  • Offline/fake suites pass.

The perf-regression gate from SwiftSync was intentionally dropped — this repo has no benchmark suite.

@3lvis 3lvis marked this pull request as ready for review June 19, 2026 23:27
Port the format and CI tooling from SwiftSync:
- .swift-format (120 cols, 4-space) and a one-time pre-commit hook
  (.githooks/pre-commit, enabled via scripts/setup.sh) that formats
  staged Swift files.
- CI jobs: swift-format check, a warnings gate (fails on any first-party
  warning:), and a dead-doc-link check (scripts/check-doc-links.py),
  alongside the existing go-httpbin build & test.
- Reformat Sources/ and Tests/ to satisfy the format check.
- Fix README link to the deleted CHANGELOG.md (-> GitHub releases) so the
  new doc-link gate is green.
@3lvis 3lvis force-pushed the ci/swift-format-and-gates branch from 7d96630 to 5aba83a Compare June 19, 2026 23:38
@3lvis 3lvis merged commit 814da3b into master Jun 20, 2026
4 checks passed
@3lvis 3lvis deleted the ci/swift-format-and-gates branch June 20, 2026 05:18
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