{"id":16699832,"url":"https://github.com/malcommac/swift-coding-guidelines","last_synced_at":"2025-04-10T03:47:27.898Z","repository":{"id":48242630,"uuid":"158108118","full_name":"malcommac/Swift-Coding-Guidelines","owner":"malcommac","description":"A repository to collect best practices when programming with Swift","archived":false,"fork":false,"pushed_at":"2018-11-19T07:09:59.000Z","size":33,"stargazers_count":20,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T05:04:41.482Z","etag":null,"topics":["best-practices","coding-style","linter","swift","swiftlint"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malcommac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-18T17:19:14.000Z","updated_at":"2025-02-08T23:35:06.000Z","dependencies_parsed_at":"2022-08-24T20:20:26.529Z","dependency_job_id":null,"html_url":"https://github.com/malcommac/Swift-Coding-Guidelines","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcommac%2FSwift-Coding-Guidelines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcommac%2FSwift-Coding-Guidelines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcommac%2FSwift-Coding-Guidelines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malcommac%2FSwift-Coding-Guidelines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malcommac","download_url":"https://codeload.github.com/malcommac/Swift-Coding-Guidelines/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154994,"owners_count":21056542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["best-practices","coding-style","linter","swift","swiftlint"],"created_at":"2024-10-12T18:08:20.346Z","updated_at":"2025-04-10T03:47:27.877Z","avatar_url":"https://github.com/malcommac.png","language":null,"readme":"# Swift Coding Guidelines\n\nThe following section describe a list of rules, code conducts and best practices used while working on iOS projects using Swift language.\nWith the help of a set of shared guidelines and automated tools we aim to maintain a higher level of code discipline and increase the reliability of the code during the entire lifecycle of a project.\n\nThe following section describe tools and rules used into the project.\nIn order to automate the check of the source code by identifying some common and uncommon mistakes [SwiftLint](https://github.com/realm/SwiftLint) tool is used and executed at each build of the project.\n\n## Index\n- [Code Formatting](1.Code_Formatting.md)\n- [Naming Conventions](2.Naming_Conventions.md)\n    - [Naming Conventions for Code](2.Naming_Conventions.md#code)\n    - [File Naming Conventions](2.Naming_Conventions.md#files)\n- [Coding Style](3.Coding_Style.md)\n    - [General Guidelines](3.Coding_Style.md#general_guidelines)\n    - [Variables](3.Coding_Style.md#variables)\n    - [Constants](3.Coding_Style.md#constants)\n    - [Tuples](3.Coding_Style.md#tuples)\n    - [Access Modifiers](3.Coding_Style.md#access_modifiers)\n    - [Custom Operators](3.Coding_Style.md#custom_operators)\n    - [Switch \u0026 Enums](3.Coding_Style.md#switch_enums)\n    - [Optionals](3.Coding_Style.md#optionals)\n    - [Protocols](3.Coding_Style.md#protocols)\n    - [Properties](3.Coding_Style.md#properties)\n    - [Ternary Operator](3.Coding_Style.md#ternary_operator)\n    - [Closures](3.Coding_Style.md#closures)\n    - [Delegates](3.Coding_Style.md#delegates)\n    - [Array](3.Coding_Style.md#array)\n    - [Using `guard`](3.Coding_Style.md#guard)\n    - [Error Handling](3.Coding_Style.md#error_handling)\n    - [Unused Code](3.Coding_Style.md#unused_code)\n    - [Importing Modules](3.Coding_Style.md#importing_modules)\n    - [Using of `self`](3.Coding_Style.md#using_self)\n    - [Classes or Structs](3.Coding_Style.md#classes_structs)\n    - [Loops](3.Coding_Style.md#loops)\n    - [Documentation \u0026 Comments](3.Coding_Style.md#doc_comments)\n- [Linter Rules](4.SwiftLint_Rules.md)\n\n### References\n\nThe following documents are used as base for this set of rules.\n- [Raywenderlich Swift Guidelines](https://github.com/raywenderlich/swift-style-guide)\n- [LinkedIn Swift Style Guide](https://github.com/linkedin/swift-style-guide)\n- [Github Swift Style Guide](https://google.github.io/swift/)\n- [Apple Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalcommac%2Fswift-coding-guidelines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalcommac%2Fswift-coding-guidelines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalcommac%2Fswift-coding-guidelines/lists"}