-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SwiftLint 導入を含めたリファクタ対応 #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
パッと見で意図がわかりづらそうな部分に関して補足
); | ||
runOnlyForDeploymentPostprocessing = 0; | ||
shellPath = /bin/sh; | ||
shellScript = "if which ${PODS_ROOT}/SwiftLint/swiftlint >/dev/null; then\n ${PODS_ROOT}/SwiftLint/swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SwiftLint 追加対応に関する変更 🍸
pod 'SCLAlertView' | ||
end | ||
|
||
post_install do |installer| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下記への対応 🍸
“Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly.
うん、このPRはLGTMっす。 force_unwrappingforce_unwrappingは自分で設定したOptionalに対して使う場合は型の設計がおかしいと思われるのでNG、UIKitとかFoundationのAPIがOptionalを返してきて、仮にnilだったら挽回不能なので敢えてクラッシュさせてしまう(例外を投げさせてしまう)という意図的な使い方はOKって感じです。 swiftlintプロジェクトはじめるときは基本的に全部のルールをONにして徐々に妥協してく感じですかねー。 例外の作法なんつっても例外を握りつぶさないってとこですね。 Result型使いたいときは |
@keitaoouchi
|
背景
下記の Issue に対応した。
fixed #3 SwiftLint を導入したい
fixed #4 SwiftLint に則って Caution 対応したい
fixed #5 Song のデータの型(Entity)を定義して持ち回したい
TODO リスト
SwiftLint 導入
SwiftLint に則って Caution 対応
Song Entity を切り出し
ほかに気になっていること
備考