Skip to content

ci: add SonarQube coverage pipeline (blueprint) - #2

Merged
alghanor merged 5 commits into
mainfrom
ci/add-sonarqube
Jul 2, 2026
Merged

ci: add SonarQube coverage pipeline (blueprint)#2
alghanor merged 5 commits into
mainfrom
ci/add-sonarqube

Conversation

@alghanor

@alghanor alghanor commented Jul 2, 2026

Copy link
Copy Markdown

Adds a SonarQube coverage pipeline for Telegraph. Draft — the build approach needs to change (see below).

Corrected diagnosis (why the xcworkspace approach fails)

tillhub/Telegraph is a fork of Building42/Telegraph whose purpose is to depend on the patched tillhub/CocoaAsyncSocket 7.6.7 (a tag that doesn't exist upstream) — wired through Package.swift (SPM):

.package(url: "https://github.com/tillhub/CocoaAsyncSocket.git", from: "7.6.7")   // fork
// upstream: robbiehanson/CocoaAsyncSocket from 7.6.5

The legacy Telegraph.xcworkspace / Telegraph iOS scheme was inherited from upstream and never updated for the fork:

  • its XCRemoteSwiftPackageReference still points at robbiehanson/CocoaAsyncSocket (7.6.4) — so building via the scheme ignores the fork's whole point;
  • the Telegraph Tests target links neither Telegraph.framework nor sets BUNDLE_LOADER (host app links nothing) → ld: framework 'Telegraph' not found.

Upstream Building42 CI uses that same legacy scheme (and a stale iPhone 14 Pro sim), so it isn't a reliable blueprint either.

Recommended fix (low-risk, no .pbxproj surgery)

Test via SPM instead of the xcworkspace:

  • swift build / swift test --enable-code-coverage against Package.swift (resolves the tillhub CocoaAsyncSocket 7.6.7 fork; TelegraphTests correctly depends on Telegraph).
  • Coverage: xcrun llvm-cov export -format=lcov … → convert lcov to Sonar generic format for sonar.coverageReportPaths (the xccov script in this PR does not apply to SPM).
  • Consider retiring or updating the stale Telegraph.xcworkspace.

The sonarqube.yaml scan config here (sources Sources, tests Tests) is still valid; only the Unit Tests build step needs to move to SPM.

🤖 Generated with Claude Code

@alghanor
alghanor merged commit 390ed02 into main Jul 2, 2026
4 of 10 checks passed
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