Skip to content
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

Swiftコーディング規約を決める #4

Closed
riscait opened this issue Mar 21, 2019 · 5 comments
Closed

Swiftコーディング規約を決める #4

riscait opened this issue Mar 21, 2019 · 5 comments
Assignees
Labels
discussion(議論) 議論が必要です 全員参加 For all members

Comments

@riscait
Copy link
Contributor

riscait commented Mar 21, 2019

話し合いながら、必要だと思ったものを追加していきましょう〜!
今後の資産にもなるので、ある程度溜まったらWikiページにまとめるのも良さそうです。

コーディングルール

  • インデントはXcode標準(スペース4個)で統一する。(control + i で整形できます)

実装ルール

  • ViewControllerのファイル・クラス名はVCと略す e.g. ExampleVC(.swift)
  • TableViewCell, CollectionViewCellのクラス名は XXXCellとする e.g. ExampleCell(.swift)

[必読] 他所のコーディングスタイル

GitHubのSwift Style Guide 日本語訳版

https://github.com/jarinosuke/swift-style-guide/blob/master/README_JP.md

@yamatatsu10969 yamatatsu10969 moved this from To Do to In Progress in 開発環境設定 Mar 24, 2019
@yamatatsu10969 yamatatsu10969 moved this from In Progress to To Do in 開発環境設定 Mar 24, 2019
@yamatatsu10969 yamatatsu10969 removed this from To Do in 開発環境設定 Mar 24, 2019
@riscait riscait added the discussion(議論) 議論が必要です label Apr 8, 2019
@riscait riscait pinned this issue Apr 8, 2019
@riscait
Copy link
Contributor Author

riscait commented Apr 8, 2019

  • ViewControllerのファイル・クラス名はVCと略す e.g. ExampleVC.swift
    を追加しました👌

@riscait
Copy link
Contributor Author

riscait commented Apr 8, 2019

  • インデントはXcode標準(スペース4個)で統一する。(control + i で整形できます)
  • TableViewCell, CollectionViewCellのクラス名は XXXCellとする e.g. ExampleCell(.swift)
    を追加しました👌

@riscait
Copy link
Contributor Author

riscait commented Apr 11, 2019

メモ
switchでは、原則全ての要素を網羅し、defaultは使用しない
Swift 5 New! → @unknown defaultが使用できる

Sent with GitHawk

@riscait
Copy link
Contributor Author

riscait commented Apr 12, 2019

参考

GitHubのSwift Style Guide 日本語訳版

https://github.com/jarinosuke/swift-style-guide/blob/master/README_JP.md

@riscait riscait assigned naipaka and stmtk1 and unassigned red-hot-y Apr 28, 2019
@riscait riscait added the 全員参加 For all members label May 1, 2019
@riscait
Copy link
Contributor Author

riscait commented May 9, 2019

原則self.は省略する を提案します
簡潔な表現をするためにselfは明記しない。
selfは、コンパイラエラーが出るところ(クロージャー内など)のみに使用する。

Sent with GitHawk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion(議論) 議論が必要です 全員参加 For all members
Projects
None yet
Development

No branches or pull requests

7 participants