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

File Types Order & Type Contents Order #2296

Merged
merged 32 commits into from
Mar 27, 2019
Merged

Conversation

Jeehut
Copy link
Collaborator

@Jeehut Jeehut commented Jul 18, 2018

This fixes #2294 by introducing two new rules:

  • file_types_order: Specifies how the types within a file should be ordered.
  • type_contents_order: Specifies the order of subtypes, properties, methods & more within a type.

@SwiftLintBot
Copy link

SwiftLintBot commented Jul 18, 2018

11654 Warnings
⚠️ Big PR
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/App/AppDelegate.swift:14:20: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/AerialVideo.swift:84:5: warning: Type Contents Order Violation: A 'type_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/AerialVideo.swift:120:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/AerialVideo.swift:149:5: warning: Type Contents Order Violation: An 'initializer' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/AerialVideo.swift:201:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:14:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:15:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:16:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:17:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:18:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:87:5: warning: Type Contents Order Violation: A 'type_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:96:5: warning: Type Contents Order Violation: A 'type_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:107:5: warning: Type Contents Order Violation: A 'type_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:113:5: warning: Type Contents Order Violation: A 'type_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:123:5: warning: Type Contents Order Violation: An 'initializer' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:133:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:146:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/Preferences.swift:133:5: warning: Type Contents Order Violation: An 'initializer' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/Preferences.swift:137:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoManager.swift:13:7: warning: File Types Order Violation: A 'main_type' should not be placed amongst the file type(s) 'supporting_type'. (file_types_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Downloads/DownloadManager.swift:12:7: warning: File Types Order Violation: A 'main_type' should not be placed amongst the file type(s) 'supporting_type'. (file_types_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Downloads/DownloadManager.swift:58:1: warning: File Types Order Violation: An 'extension' should not be placed amongst the file type(s) 'supporting_type'. (file_types_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Downloads/DownloadManager.swift:87:1: warning: File Types Order Violation: An 'extension' should not be placed amongst the file type(s) 'supporting_type'. (file_types_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:36:12: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:39:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:41:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:42:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:43:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:44:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:45:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:46:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:47:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:48:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:49:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:50:29: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:54:12: warning: Type Contents Order Violation: An 'initializer' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:71:21: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:15:7: warning: File Types Order Violation: A 'main_type' should not be placed amongst the file type(s) 'supporting_type'. (file_types_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:17:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:18:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:19:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:20:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:21:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:22:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:36:14: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'ib_action'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:41:11: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'ib_action'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:49:14: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'ib_action'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:53:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'ib_action'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:83:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'ib_action'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:94:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'ib_action'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:98:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'ib_action'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:108:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'ib_action'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:117:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'ib_action'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:125:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'ib_action'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:145:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'initializer'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:189:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'initializer'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:206:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'initializer'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:18:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:19:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:20:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:21:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:22:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:23:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:25:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:26:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:27:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:28:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:30:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:31:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:33:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:34:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:35:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:36:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:37:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:39:5: warning: Type Contents Order Violation: An 'instance_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:41:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:46:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:60:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:74:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:79:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:82:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:87:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:88:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:90:5: warning: Type Contents Order Violation: A 'type_property' should not be placed amongst the type content(s) 'subtype'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:109:14: warning: Type Contents Order Violation: An 'initializer' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:117:14: warning: Type Contents Order Violation: An 'initializer' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:123:5: warning: Type Contents Order Violation: An 'initializer' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:148:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:180:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:306:14: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:317:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:394:14: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:411:14: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:433:11: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:438:11: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:442:11: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:446:11: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:455:23: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:479:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:585:13: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:601:13: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:727:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:789:13: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:829:13: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:945:13: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:988:13: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:1036:13: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:1069:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:1084:5: warning: Type Contents Order Violation: An 'other_method' should not be placed amongst the type content(s) 'instance_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:54:20: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:55:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:56:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:57:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:58:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:59:20: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:60:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ This PR introduced a violation in Aerial: /Users/vsts/agent/2.149.1/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:61:15: warning: Type Contents Order Violation: An 'ib_outlet' should not be placed amongst the type content(s) 'type_property'. (type_contents_order)
⚠️ Danger found 11654 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 118.
12 Messages
📖 Linting Aerial with this PR took 1.91s vs 1.8s on master (6% slower)
📖 Linting Alamofire with this PR took 4.07s vs 3.98s on master (2% slower)
📖 Linting Firefox with this PR took 13.12s vs 12.37s on master (6% slower)
📖 Linting Kickstarter with this PR took 22.23s vs 20.12s on master (10% slower)
📖 Linting Moya with this PR took 2.13s vs 1.98s on master (7% slower)
📖 Linting Nimble with this PR took 1.86s vs 1.76s on master (5% slower)
📖 Linting Quick with this PR took 0.58s vs 0.56s on master (3% slower)
📖 Linting Realm with this PR took 3.57s vs 3.36s on master (6% slower)
📖 Linting SourceKitten with this PR took 1.2s vs 1.12s on master (7% slower)
📖 Linting Sourcery with this PR took 4.41s vs 4.05s on master (8% slower)
📖 Linting Swift with this PR took 27.67s vs 26.95s on master (2% slower)
📖 Linting WordPress with this PR took 22.81s vs 21.48s on master (6% slower)

Generated by 🚫 Danger

@Jeehut
Copy link
Collaborator Author

Jeehut commented Jul 19, 2018

I just added configuration files to both rules, this means the only missing thing is fixing the locations in the tests. Since I have no idea why this happens, help or at least a hint is highly appreciated!
@jpsim @marcelofabri @norio-nomura

@marcelofabri
Copy link
Collaborator

As you can see the offset to the init method points to somewhere right in the middle of the override keyword, which is weird.

I think it actually points to init, because we remove the violation marker from the string before passing to the rule.

@Jeehut
Copy link
Collaborator Author

Jeehut commented Jul 20, 2018

@marcelofabri Okay, you were right about that example which I fixed now. But that was not what was irritating me, here's a few examples which now still are a problem and I can't understand why:

/* 👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦 */
↓class TestViewController: UIViewController {}
                                          ^ warning: File Types Order Violation: A 'main_type' should not be placed amongst the file type(s) 'supporting_type'. (file_types_order)

// Supporting Types
protocol TestViewControllerDelegate {
    func didPressTrackedButton()
}
/* 👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦 */
// Supporting Types
protocol TestViewControllerDelegate {
    func didPressTrackedButton()
}

// Extensions
↓extension TestViewController: UITableViewDataSource {
                                          ^ warning: File Types Order Violation: A 'extension' should not be placed amongst the file type(s) 'main_type'. (file_types_order)
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 1
    }

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        return UITableViewCell()
    }
}

class TestViewController: UIViewController {}

// Extensions
extension TestViewController: UITableViewDataSource {
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 1
    }

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        return UITableViewCell()
    }
}
/* 👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦 */
class TestViewController: UIViewController {
    // Subtypes
    ↓class TestClass {
        // 10 lines
    }
    ^ warning: Type Contents Order Violation: A 'subtype' should not be placed amongst the type content(s) 'type_alias,associated_type'. (type_contents_order)

    // Type Aliases
    typealias CompletionHandler = ((TestEnum) -> Void)
}
/* 👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦 */
class TestViewController: UIViewController {
    // IBActions
    @IBAction ↓func goNextButtonPressed() {
        goToNextVc()
             ^ warning: Type Contents Order Violation: A 'ib_action' should not be placed amongst the type content(s) 'view_life_cycle_method'. (type_contents_order)
        delegate?.didPressTrackedButton()
    }

    // View Life-Cycle Methods
    override func viewDidLoad() {
        super.viewDidLoad()

        view1.setNeedsLayout()
        view1.layoutIfNeeded()
        hasLayoutedView1 = true
    }
}

It only happens when there's the /* 👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦 */ prepended at the beginning.

@Jeehut Jeehut force-pushed the file-content-order branch 2 times, most recently from 11d424e to f5b1272 Compare July 20, 2018 08:21
@Jeehut Jeehut changed the title [WIP] File content order File content order Jul 20, 2018
@Jeehut Jeehut mentioned this pull request Jul 20, 2018
@Jeehut Jeehut force-pushed the file-content-order branch 2 times, most recently from cb0f213 to 705f23a Compare July 22, 2018 17:22
@Jeehut
Copy link
Collaborator Author

Jeehut commented Jul 22, 2018

I just fixed all issues and rebased this to the latest master. Ready to merge from my point of view! 🎉

@Jeehut Jeehut force-pushed the file-content-order branch 2 times, most recently from a2a872f to 745ee3c Compare July 24, 2018 10:30
@Jeehut
Copy link
Collaborator Author

Jeehut commented Jul 24, 2018

Okay, I just found the issue which made the CI fail when running this with Swift 4: It's due to subscript and typealias missing from SourceKit for versions below 4.1. I fixed this issue by not testing the cases which include the supporting type on Swift 4.

I hope the CI will be happy now and this can be merged. Anything else holding this off?

@codecov-io
Copy link

codecov-io commented Jul 24, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@dde13e4). Click here to learn what that means.
The diff coverage is 94.76%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2296   +/-   ##
=========================================
  Coverage          ?   90.93%           
=========================================
  Files             ?      326           
  Lines             ?    16851           
  Branches          ?        0           
=========================================
  Hits              ?    15323           
  Misses            ?     1528           
  Partials          ?        0
Impacted Files Coverage Δ
...ftLintFrameworkTests/FileTypesOrderRuleTests.swift 100% <100%> (ø)
...intFrameworkTests/TypeContentsOrderRuleTests.swift 100% <100%> (ø)
...onfigurations/TypeContentsOrderConfiguration.swift 57.69% <57.69%> (ø)
...leConfigurations/FileTypesOrderConfiguration.swift 57.69% <57.69%> (ø)
...LintFramework/Rules/Style/FileTypesOrderRule.swift 91.42% <91.42%> (ø)
...tFramework/Rules/Style/TypeContentsOrderRule.swift 96.11% <96.11%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dde13e4...085c5b8. Read the comment docs.

@Jeehut Jeehut force-pushed the file-content-order branch from a17aa1b to b6b8a02 Compare July 24, 2018 15:56
@Jeehut
Copy link
Collaborator Author

Jeehut commented Jul 24, 2018

Just rebased to solve merge conflicts.

@Jeehut Jeehut force-pushed the file-content-order branch from b6b8a02 to 8df61bf Compare August 3, 2018 14:54
@Jeehut
Copy link
Collaborator Author

Jeehut commented Sep 26, 2018

Just rebased this branch onto current master.

@Jeehut Jeehut force-pushed the file-content-order branch from 9e415c6 to b8ac708 Compare December 3, 2018 06:50
@Jeehut Jeehut changed the title File content order File Types Order & Type Contents Order Dec 3, 2018
@Jeehut Jeehut force-pushed the file-content-order branch from b8ac708 to c8bec9e Compare December 3, 2018 06:53
@Jeehut
Copy link
Collaborator Author

Jeehut commented Dec 3, 2018

@jpsim I just rebased this, too. Thanks again for merging the others!

For an example on how we configure these rules, see here and there.

@Jeehut Jeehut force-pushed the file-content-order branch from b75b8b6 to 2b60fc2 Compare December 11, 2018 08:44
@Jeehut
Copy link
Collaborator Author

Jeehut commented Dec 11, 2018

I just rebased this to resolve merge conflicts. @jpsim Would you mind taking another look? I fixed your small comment a week ago, do you have any other reservations or can we merge now (once the CI has passed)?

@Jeehut Jeehut force-pushed the file-content-order branch from 2b60fc2 to 085c5b8 Compare February 12, 2019 09:24
@Jeehut
Copy link
Collaborator Author

Jeehut commented Mar 27, 2019

Okay, just as I announced a month ago (and I waited way longer than 10 days), since there was no feedback whatsoever since then and due to the reasons explained here, I'm merging this without additional feedback from other contributors once CI passes.

@Jeehut Jeehut force-pushed the file-content-order branch from e25e0cf to d35e2a7 Compare March 27, 2019 10:37
@Jeehut Jeehut force-pushed the file-content-order branch from d35e2a7 to b145d66 Compare March 27, 2019 10:55
@Jeehut Jeehut merged commit dc22d93 into realm:master Mar 27, 2019
@rumnat
Copy link

rumnat commented Mar 28, 2019

I'd like to have the following structure:

  1. enums
  2. protocols
  3. Main Class
  • outlets
  • private field
  • public fields
  • overriding methods
  • public methods
  1. Private extension of main class
  2. Rest of Extensions for each protocol implementation or separate logic

Can I reach it using your rule? Thanks in advance

@Jeehut
Copy link
Collaborator Author

Jeehut commented Mar 28, 2019

You can't differentiate between the types as of now (e.g. enums vs. protocols, both would belong to supporting_type) also not between private and public, but try this with the file_types_order rule:

file_types_order:
  order:
    - supporting_type
    - main_type
    - extension

Note that this is actually the default, so you could also just turn on the rule and it should be like this.

Regarding the type contents, what you want is currently not possible as you can't differentiate between private and public accessor, also you currently can't detect if a method is overriding or not. Those would all be even more detailed and could be added as an improvement to this rule. You can define the kinds of contents though, to me it looks like this might fit your preferences (assuming you first prefer type functions, then object functions):

type_contents_order:
  order:
    - case
    - [type_alias, associated_type, subtype]
    - ib_outlet
    - [type_property, ib_inspectable, instance_property]
    - initializer
    - type_method
    - view_life_cycle_method
    - [ib_action, other_method]
    - subscript

Feel free to create issues which request additional rules named something like visibility_modifier_order and override_order where we could enforce a specific modifier order given the type is the same. E.g. specifying something like this:

visibility_modifier_order:
  order:
    - [public, open]
    - [internal, implicit]
    - [private, fileprivate]

override_order:
  override_top: true

@piobyz
Copy link

piobyz commented Mar 30, 2019

For an example on how we configure these rules, see here

Wow, what a great source of Custom Rules, thanks @Dschee

@jpsim
Copy link
Collaborator

jpsim commented Apr 7, 2019

Thanks for all your work on this PR and really stepping up as a contributor and maintainer of this project overall @Dschee! I especially appreciate how thorough you were in adding tests and considering edges cases here.

Okay, just as I announced a month ago (and I waited way longer than 10 days), since there was no feedback whatsoever since then and due to the reasons explained here, I'm merging this without additional feedback from other contributors once CI passes.

I understand how frustrating it must be to not get feedback on your work for very long stretches of time. You did the right thing merging this. I'm sorry for not being very involved in SwiftLint on a regular basis any more 😕.

SwiftLint doesn't have a single gatekeeper (I'm sorry if I ever gave that impression). There are over a dozen people with write access to this git repository and any one of those contributors should feel empowered to merge PRs, cut releases and help review other PRs/issues.

I hope you'll keep contributing to this project as you've really made it so much better by your contributions so far.

@Jeehut
Copy link
Collaborator Author

Jeehut commented Apr 8, 2019

Thank you for those kind words @jpsim and also for approving my self-merge. I still feel bad about it since usually I‘m the guy stressing how important a review is, but I felt different in this case. Thank you for your understanding!

I can understand that maintaining open source software - especially when there are so many users with different needs - can become hard at times. That‘s why I tried to help out when I had some time left over. Let‘s keep improving SwiftLint all together!

@samrayner
Copy link
Contributor

Thanks for this awesome addition @Dschee!

I'm getting one false positive. Files that only contain extensions are being flagged with:

File Types Order Violation: An 'extension' should not be placed amongst the file type(s) 'main_type'. (file_types_order)

@Jeehut
Copy link
Collaborator Author

Jeehut commented Apr 29, 2019

@samrayner Could you please open an issue with that false positive so we can track it and fix it?

Also, please provide a code example where this happens so we can properly reproduce it.

@samrayner
Copy link
Contributor

@Dschee #2749 Sorry for the delay!

@Lutzifer
Copy link
Contributor

great rule. How do we get this to autocorrect?

@rogerluan
Copy link
Contributor

Just dropping a line to show my appreciation over this rule! Absolutely great addition, can't wait to use it! 🚀

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.

Rule Request: File Content Order
10 participants