Skip to content

Clear the SwiftLint warnings - #34

Merged
bubio merged 1 commit into
mainfrom
chore/swiftlint-cleanup
Oct 13, 2026
Merged

bubio merged 1 commit into
mainfrom
chore/swiftlint-cleanup

Conversation

@bubio

@bubio bubio commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • scripts/lint.sh(bubio/Bubilator88 側)で出ていたコアの SwiftLint 指摘 16 件を解消
    • 冗長な = nil、guard の不要な括弧、default 末尾の不要な break を削除
    • ssgPhase += 1、reduce(into: false) → contains
    • String(decoding:) → failable String(bytes:encoding:)(MemoryImage は ASCII 限定、CApiTests は元々 String?)
    • enumerated() を使わず最初の差分インデックスを取得(unused_enumerated の誤検知回避)
    • D88Disk のディスク名は Shift-JIS で読めない場合も lossy UTF-8 で表示するため、挙動を変えず swiftlint:disable:this に理由を添えて残す
  • 挙動の変更なし。バージョンタグは打たない(アプリ側の pin も更新しない)

アプリ側の対応する変更は bubio/Bubilator88 の lint 修正 PR。

Test plan

  • swift test(1046 tests passed)
  • scripts/regression_compare.py(20/20 PASS)
  • scripts/lint.sh で指摘 0 件
  • scripts/format_all.sh --check OK

🤖 Generated with Claude Code

Drop redundant `= nil` initializers, needless parentheses and a trailing
`break`, use `+=`, `contains` and failable string initializers, and find
the first differing byte without `enumerated()`. D88Disk keeps its lossy
UTF-8 fallback for disk names on purpose, with the rule silenced there.

No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bubio
bubio merged commit 27fa333 into main Oct 13, 2026
3 checks passed
@bubio
bubio deleted the chore/swiftlint-cleanup branch October 13, 2026 08:59
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