build(ci): run SwiftLint on pull requests - #59
Merged
Conversation
CI had no lint step since the Hound integration was removed: ci.yml drives xcodebuild directly and never reached the Fastlane lint lane, so style violations were only caught by running SwiftLint by hand. Add a lint job to ci.yml. It runs on ubuntu-latest and installs the SwiftLint version pinned in .mise.toml through mise-action, so CI and local runs use the same binary. The 135 sources currently hold 112 warnings and 0 serious violations. Freeze them in .swiftlint-baseline.json and lint with --strict so the job fails on new violations while the existing ones stay untouched. The lint lane matches that invocation, and a lint_baseline lane regenerates the file. Also drop the identifier_name settings from .swiftlint.yml. The rule is in disabled_rules, so the block only produced a warning on every run.
futamura
added a commit
that referenced
this pull request
Aug 21, 2026
UIKitSpec's "prepares blurred snapshots before becoming visible" waited only 0.5 seconds for the blurred image and failed on CI in PRs #47, #58 and #59. A rerun of the same commit passed every time. FluidBlurredBackgroundView produces the image across two async hops: blurQueue runs CIGaussianBlur, then the main queue assigns blurView.image. A loaded runner does not always finish both within 0.5s. This was the only tight timeout in the suite; the other five call sites use the 10 second default and have never flaked. Drop the override so the test uses that default, and assert visibility and alpha again after the wait. The claim the test makes, that the snapshot is prepared while the view is invisible, now rests on those assertions instead of on how long the wait happened to be.
Merged
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.
目的
Hound integration 削除 (#58) 以降、PR 時の自動 lint が存在しなかった。
ci.ymlの jobtestは Fastlane を経由せずxcodebuildを直接叩くため、SwiftLint はlintlane の手動実行でしか走らない状態だった (#40)。主要変更点
.github/workflows/ci.ymlに joblintを追加。ubuntu-latest上でjdx/mise-action@v4(install_args: swiftlint) を使い、.mise.tomlに pin した SwiftLint0.63.2を導入する。local と CI で同一 binary。.swiftlint-baseline.jsonを追加。現状の 112 warnings / 0 serious を凍結する。--strictで実行し、新規違反のみ fail させる。既存コードには手を入れない。--reporter github-actions-loggingにより違反が PR diff 上に inline annotation として出る。fastlane/Fastfile:lintlane を CI と同一の invocation へ更新し、baseline 再生成用のlint_baselinelane を追加。.swiftlint.yml:identifier_nameはdisabled_rulesに入っているため、設定 block は毎回warning: Found a configuration for 'identifier_name' rule, but it is disabledを出すだけだった。block を削除 (挙動は不変)。Verification
git diff --checkci.ymlYAML parselint,test。testの check context / steps 9 件は不変bundle exec fastlane ios lintforce_castを含む一時 file)error: Force Cast Violationを検出。probe は削除済みSources/相対 path (絶対 path 0)lintUI 変更なし。transition / layout / gesture / animation / Storyboard に非該当のため Simulator 確認は対象外。
補足
lintの required check 化は本 PR では行わない。job が green と確認できた後、main-protectionruleset のrequired_status_checksへ追加するかを別途判断する。関連: #40