Skip to content

Ignore prefer_self_in_static_references rule in extensions generally - #3813

Merged
jpsim merged 1 commit into
realm:masterfrom
SimplyDanny:ignore-prefer-self-rule-in-extensions
Jan 24, 2022
Merged

jpsim merged 1 commit into
realm:masterfrom
SimplyDanny:ignore-prefer-self-rule-in-extensions

Conversation

@SimplyDanny

Copy link
Copy Markdown
Collaborator

Fixes #3775. The issue is that SourceKitten cannot tell whether an extension extends a class, a struct or an enum. Or can it somehow? 🤔

To make it safe, it's better to ignore the rule in extensions completely for the time being.

@SimplyDanny
SimplyDanny force-pushed the ignore-prefer-self-rule-in-extensions branch from cf4e3dc to 75b18ba Compare January 23, 2022 16:20
@SwiftLintBot

SwiftLintBot commented Jan 23, 2022 •

Copy link
Copy Markdown
572 Messages
📖 Linting Aerial with this PR took 0.23s vs 0.23s on master (0% slower)
📖 Linting Alamofire with this PR took 0.27s vs 0.27s on master (0% slower)
📖 Linting Firefox with this PR took 1.09s vs 1.09s on master (0% slower)
📖 Linting Kickstarter with this PR took 1.81s vs 1.79s on master (1% slower)
📖 Linting Moya with this PR took 0.12s vs 0.12s on master (0% slower)
📖 Linting Nimble with this PR took 0.13s vs 0.13s on master (0% slower)
📖 Linting Quick with this PR took 0.07s vs 0.07s on master (0% slower)
📖 Linting Realm with this PR took 0.79s vs 0.8s on master (1% faster)
📖 Linting SourceKitten with this PR took 0.11s vs 0.11s on master (0% slower)
📖 Linting Sourcery with this PR took 0.37s vs 0.38s on master (2% faster)
📖 Linting Swift with this PR took 1.17s vs 1.18s on master (0% faster)
📖 Linting WordPress with this PR took 2.04s vs 2.03s on master (0% slower)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/CustomVideoFolders.swift:145:46: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/CustomVideoFolders.swift:25:46: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/CustomVideoFolders.swift:80:46: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Extensions/DispatchQueue+Extension.swift:14:9: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Extensions/DispatchQueue+Extension.swift:17:17: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Time/Solar.swift:336:32: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Models/Time/Solar.swift:340:41: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:107:34: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:114:39: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:115:42: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:58:25: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Example/Source/DetailViewController.swift:209:35: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Source/OperationQueue+Alamofire.swift:38:57: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Source/URLEncodedFormEncoder.swift:435:25: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Source/URLEncodedFormEncoder.swift:444:9: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Source/URLEncodedFormEncoder.swift:452:9: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Source/URLEncodedFormEncoder.swift:980:16: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Tests/Bundle+AlamofireTests.swift:31:18: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Tests/FileManager+AlamofireTests.swift:35:30: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Tests/FileManager+AlamofireTests.swift:43:17: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Tests/FileManager+AlamofireTests.swift:58:17: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Alamofire: /Tests/FileManager+AlamofireTests.swift:72:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Extensions/NSAttributedStringExtensions.swift:10:108: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Extensions/NSAttributedStringExtensions.swift:10:32: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Extensions/UIPasteboardExtensions.swift:25:16: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Extensions/UIPasteboardExtensions.swift:36:20: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/FirefoxTabContentBlocker.swift:108:25: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/TabDisplayManager.swift:931:34: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/TabDisplayManager.swift:934:52: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/TabDisplayManager.swift:946:13: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Browser/TabDisplayManager.swift:951:13: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Settings/LoginDetailViewController.swift:152:80: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Frontend/Strings.swift:1114:43: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Telemetry/TelemetryWrapper.swift:793:37: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Telemetry/TelemetryWrapper.swift:793:94: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Telemetry/TelemetryWrapper.swift:794:17: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Utils/FaviconFetcher+Non-Bundled.swift:126:39: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Utils/FaviconFetcher+Non-Bundled.swift:126:91: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Client/Utils/FaviconFetcher+Non-Bundled.swift:158:9: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Extensions/ShareTo/ShareViewController.swift:46:32: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Shared/Extensions/NSFileManagerExtensions.swift:30:41: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Shared/Extensions/NSFileManagerExtensions.swift:87:20: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Shared/Extensions/UIBarButtonItemExtensions.swift:32:78: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Shared/Extensions/UIBarButtonItemExtensions.swift:38:83: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Shared/Extensions/UIImageExtensions.swift:56:20: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Shared/Logger.swift:15:87: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Shared/Logger.swift:18:93: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Shared/Logger.swift:21:44: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Shared/Logger.swift:25:89: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Shared/Logger.swift:91:28: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Storage/SQL/SQLiteHistory.swift:428:64: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Storage/SQL/SQLiteHistory.swift:615:84: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Storage/SQL/SQLiteHistory.swift:667:65: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Storage/SQL/SQLiteHistoryFavicons.swift:91:66: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Storage/SQL/SQLiteHistoryRecommendations.swift:17:57: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Storage/SQL/SQLiteHistoryRecommendations.swift:19:81: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Storage/SQL/SQLiteReadingList.swift:34:53: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Storage/SQL/SQLiteReadingList.swift:65:69: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Storage/SQL/SQLiteReadingList.swift:79:54: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Storage/SQL/SQLiteReadingList.swift:99:69: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /Sync/Synchronizers/Synchronizer.swift:284:33: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /Kickstarter-iOS/Views/Controllers/DiscoveryPageViewController.swift:547:7: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /Kickstarter-iOS/Views/Controllers/ManagePledgeViewController.swift:605:25: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /Kickstarter-iOS/Views/Controllers/RewardsCollectionViewController.swift:345:25: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/Service+RequestHelpers.swift:19:12: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/Service+RequestHelpers.swift:33:12: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/extensions/NSURLSession.swift:92:12: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/Activity.swift:64:39: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/Activity.swift:68:27: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/CommentsEnvelope.swift:16:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/CommentsEnvelope.swift:22:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/ErrorEnvelope.swift:164:46: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/ErrorEnvelope.swift:166:22: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/Project.swift:278:24: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/Project.swift:280:27: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/Project.swift:281:22: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/Project.swift:287:32: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/Project.swift:290:27: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/Project.swift:294:22: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/Update.swift:63:35: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/User.swift:124:28: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/User.swift:125:30: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/User.swift:129:22: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/UserEnvelope.swift:13:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/GraphComment.swift:46:37: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/GraphComment.swift:52:44: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Category+CategoryFragment.swift:21:27: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Checkout+CheckoutFragment.swift:12:16: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Checkout+CheckoutFragment.swift:7:19: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/ClearUserUnseenActivityEnvelope+ClearUserUnseenActivityMutation.Data.swift:19:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Comment+CommentFragment.swift:17:21: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Comment+CommentWithRepliesFragment.swift:17:21: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Comment+PostCommentMutationData.swift:14:25: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Comment+PostCommentMutationData.swift:27:14: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/CommentRepliesEnvelope+GraphCommentRepliesEnvelope.swift:32:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/CreateBackingEnvelope+CreateBackingMutation.Data.swift:15:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/CreatePaymentSourceEnvelope+CreatePaymentSourceMutation.Data.swift:30:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/DeletePaymentSourceEnvelope+DeletePaymentSourceMutation.Data.swift:27:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+FetchAddOnsQueryData.swift:32:21: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+FetchAddOnsQueryData.swift:8:25: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+FetchProjectFriendsQueryData.swift:17:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+FetchProjectFriendsQueryData.swift:9:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+FetchProjectQueryData.swift:16:31: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+FetchProjectQueryData.swift:35:31: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+FetchProjectQueryData.swift:62:21: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+FetchProjectQueryData.swift:84:21: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+FetchProjectRewardsByIdQueryData.swift:9:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+ProjectFragment.swift:22:22: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/Project+ProjectFragment.swift:33:16: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/SignInWithAppleEnvelope+SignInWithAppleMutation.Data.swift:26:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/UpdateBackingEnvelope+UpdateBackingMutation.Data.swift:21:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/UserCreditCards+UserFragment.swift:15:14: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/WatchProjectResponseEnvelope+UnwatchProjectMutation.Data.swift:24:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/graphql/adapters/WatchProjectResponseEnvelope+WatchProjectMutation.Data.swift:25:26: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /KsApi/models/templates/ActivityTemplates.swift:9:17: warning: Prefer Self in Static References Violation: Static references should be prefixed by Self instead of the class name. (prefer_self_in_static_references)
⚠️ Danger found 572 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 127.

Generated by 🚫 Danger

@SimplyDanny
SimplyDanny force-pushed the ignore-prefer-self-rule-in-extensions branch from 75b18ba to 489d6ac Compare January 23, 2022 16:49
@SimplyDanny
SimplyDanny force-pushed the ignore-prefer-self-rule-in-extensions branch from 489d6ac to a77af1a Compare January 23, 2022 17:43
@jpsim

jpsim commented Jan 24, 2022

Copy link
Copy Markdown
Collaborator

The issue is that SourceKitten cannot tell whether an extension extends a class, a struct or an enum. Or can it somehow?

No it can't because that information is only available in the post-typechecked AST, and SwiftLint lint rules operate on the pre-typechecked AST. Only SwiftLint analyzer rules have access to the post-typechecked AST.

@jpsim
jpsim merged commit a94d120 into realm:master Jan 24, 2022
@SimplyDanny
SimplyDanny deleted the ignore-prefer-self-rule-in-extensions branch January 24, 2022 18:58
rcole34 pushed a commit to rcole34/SwiftLint that referenced this pull request Feb 22, 2022
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.

prefer_self_in_static_references error with static property initializers in extensions

3 participants