Skip to content

Silence prefer_self_in_static_references on generics lists in classes and extensions - #6676

Merged
SimplyDanny merged 1 commit into
mainfrom
self-in-generics
May 28, 2026
Merged

SimplyDanny merged 1 commit into
mainfrom
self-in-generics

Conversation

@SimplyDanny

Copy link
Copy Markdown
Collaborator

Fixes #6674.

@SwiftLintBot

Copy link
Copy Markdown
128 Messages
📖 Building this branch resulted in a binary size of 27519.4 KiB vs 27519.02 KiB when built on main (0% larger).
📖 Linting Aerial with this PR took 0.74 s vs 0.74 s on main (0% slower).
📖 Linting Alamofire with this PR took 1.06 s vs 1.02 s on main (3% slower).
📖 Linting Brave with this PR took 7.05 s vs 7.06 s on main (0% faster).
📖 Linting DuckDuckGo with this PR took 28.91 s vs 28.95 s on main (0% faster).
📖 Linting Firefox with this PR took 12.15 s vs 12.18 s on main (0% faster).
📖 Linting Kickstarter with this PR took 8.26 s vs 8.26 s on main (0% slower).
📖 Linting Moya with this PR took 0.44 s vs 0.45 s on main (2% faster).
📖 Linting NetNewsWire with this PR took 2.82 s vs 2.78 s on main (1% slower).
📖 Linting Nimble with this PR took 0.66 s vs 0.66 s on main (0% slower).
📖 Linting PocketCasts with this PR took 7.92 s vs 8.01 s on main (1% faster).
📖 Linting Quick with this PR took 0.44 s vs 0.4 s on main (9% slower).
📖 Linting Realm with this PR took 2.91 s vs 2.86 s on main (1% slower).
📖 Linting Sourcery with this PR took 1.8 s vs 1.82 s on main (1% faster).
📖 Linting Swift with this PR took 4.57 s vs 4.57 s on main (0% slower).
📖 Linting SwiftLintPerformanceTests with this PR took 0.16 s vs 0.16 s on main (0% slower).
📖 Linting VLC with this PR took 1.2 s vs 1.2 s on main (0% slower).
📖 Linting Wire with this PR took 18.23 s vs 18.24 s on main (0% faster).
📖 Linting WordPress with this PR took 12.4 s vs 12.43 s on main (0% faster).
📖 This PR fixed a violation in Brave: /ios/brave-ios/App/BraveWidgets/WidgetBackground.swift:26:34: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Brave: /ios/brave-ios/Sources/AIChat/Components/Popover/PopoverView.swift:35:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Brave: /ios/brave-ios/Sources/BraveUI/SwiftUI/BravePopup.swift:31:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Brave: /ios/brave-ios/Sources/BraveUI/SwiftUI/OSAvailabilityModifier.swift:15:48: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/UIComponents/Sources/UIComponents/Shared/View+ConditionalModifiers.swift:27:37: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/UIComponents/Sources/UIComponents/Shared/View+ConditionalModifiers.swift:40:40: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in DuckDuckGo: /SharedPackages/DataBrokerProtectionCore/Sources/DataBrokerProtectionCore/Model/ExtractedProfile.swift:234:88: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in DuckDuckGo: /macOS/DuckDuckGo/Common/Extensions/Publishers.NestedObjectChanges.swift:24:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in DuckDuckGo: /macOS/DuckDuckGo/Common/Extensions/Publishers.NestedObjectChanges.swift:28:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in DuckDuckGo: /iOS/DuckDuckGo/ViewExtension.swift:102:47: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in DuckDuckGo: /iOS/DuckDuckGo/ViewExtension.swift:102:56: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in DuckDuckGo: /iOS/DuckDuckGoTests/AIChat/AIChatContextualWebViewControllerTests.swift:124:26: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /SampleBrowser/SampleBrowser/Extensions/UIView+Extension.swift:22:26: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /BrowserKit/Sources/Shared/Functions.swift:162:17: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /BrowserKit/Sources/Common/Extensions/UIViewExtension.swift:32:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /BrowserKit/Sources/Common/Extensions/StringExtension.swift:10:88: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Firefox: /BrowserKit/Sources/ComponentLibrary/SwiftUI/ViewExtensions.swift:21:31: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Kickstarter: /Kickstarter-Framework/Sources/Kickstarter-Framework/Kickstarter-iOS/Features/PledgedProjectsOverview/PPOViewModel.swift:432:100: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in PocketCasts: /Pocket Casts TV App/UI/Common/BlurredCoverBackground.swift:21:45: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in PocketCasts: /podcasts/SharingHelper+swipeButton.swift:18:23: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in PocketCasts: /podcasts/Extensions/UIView+Nib.swift:4:27: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in PocketCasts: /podcasts/Utilities/SwiftUI/View+Buttonize.swift:22:29: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in PocketCasts: /podcasts/Utilities/SwiftUI/View+if.swift:9:37: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in PocketCasts: /podcasts/DownloadManager.swift:19:68: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in PocketCasts: /podcasts/DownloadManager.swift:31:77: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in PocketCasts: /podcasts/Onboarding/Plus/PlusButtonStyles.swift:199:35: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in PocketCasts: /Modules/Sources/PocketCastsUtils/Extensions/JSONCodable.swift:63:38: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/Aliases.swift:64:31: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/Aliases.swift:73:31: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/Aliases.swift:90:41: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/SectionedResults.swift:240:54: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/SectionedResults.swift:510:54: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/SwiftUI.swift:1407:65: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/SwiftUI.swift:1441:65: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/SwiftUI.swift:1656:35: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/SwiftUI.swift:1703:35: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/SwiftUI.swift:1750:27: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/SwiftUI.swift:1943:27: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/SwiftUI.swift:1994:27: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/SwiftUI.swift:2045:27: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/Tests/TestValueFactory.swift:99:77: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/Object.swift:445:38: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/Object.swift:489:38: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/Object.swift:530:38: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/Object.swift:574:38: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Realm: /RealmSwift/Combine.swift:635:143: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/UIntBuffer.swift:151:35: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/UIntBuffer.swift:156:36: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/UIntBuffer.swift:161:36: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Diffing.swift:146:29: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Diffing.swift:173:29: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/IntegerParsing.swift:258:42: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/StringComparable.swift:22:31: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/StringComparable.swift:31:31: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/StringComparable.swift:41:30: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/StringComparable.swift:50:30: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/StringComparable.swift:56:31: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/StringComparable.swift:62:31: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Pointer.swift:141:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Pointer.swift:155:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Pointer.swift:186:32: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Pointer.swift:200:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Pointer.swift:214:32: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Pointer.swift:228:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Join.swift:166:35: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Join.swift:182:45: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Integers.swift:1360:31: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Integers.swift:1368:31: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Integers.swift:1920:12: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Integers.swift:1964:12: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Integers.swift:1980:32: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Integers.swift:2014:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Integers.swift:2029:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Integers.swift:2044:32: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Integers.swift:2604:19: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/StringLegacy.swift:84:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/StringLegacy.swift:118:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/FloatingPoint.swift:1757:32: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/FloatingPoint.swift:1899:23: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/FloatingPoint.swift:1960:24: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/SequenceAlgorithms.swift:236:38: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/SequenceAlgorithms.swift:282:38: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/SequenceAlgorithms.swift:319:44: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/SequenceAlgorithms.swift:363:44: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/SequenceAlgorithms.swift:408:56: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/SequenceAlgorithms.swift:461:56: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/SequenceAlgorithms.swift:817:40: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/Flatten.swift:104:35: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/LazySequence.swift:165:48: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/RangeReplaceableCollection.swift:1085:12: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/core/LazyCollection.swift:24:51: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/Cxx/CxxDictionary.swift:150:29: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/Cxx/CxxDictionary.swift:176:29: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/Cxx/CxxDictionary.swift:263:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/Cxx/CxxDictionary.swift:301:38: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/Concurrency/AsyncThrowingFlatMapSequence.swift:58:52: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/Concurrency/AsyncFlatMapSequence.swift:44:45: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/Concurrency/AsyncFlatMapSequence.swift:78:52: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/Concurrency/AsyncFlatMapSequence.swift:114:52: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/public/Concurrency/AsyncFlatMapSequence.swift:150:52: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Swift: /stdlib/private/StdlibUnittest/StringTestHelpers.swift:76:29: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in VLC: /Sources/Extensions/UIKit/UIViewController+findViewController.swift:13:32: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in VLC: /Sources/Extensions/UIKit/UIViewController+findViewController.swift:38:33: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Wire: /wire-ios/Wire-iOS Tests/MockStableRandomParticipantsConversation.swift:33:47: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Wire: /wire-ios/Wire-iOS Tests/MockStableRandomParticipantsConversation.swift:50:44: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Wire: /wire-ios/Wire-iOS Tests/MockStableRandomParticipantsConversation.swift:65:46: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Wire: /wire-ios/Wire-iOS/Sources/UserInterface/Helpers/UIViewController+Convenience.swift:58:24: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Wire: /wire-ios/Wire-iOS/Sources/UserInterface/Conversation/SenderObserver.swift:48:30: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)
📖 This PR fixed a violation in Wire: /wire-ios-system/Source/SafeForLoggingStringConvertible.swift:37:56: Warning: Use Self to refer to the surrounding type name (prefer_self_in_static_references)

Generated by 🚫 Danger

@SimplyDanny
SimplyDanny merged commit 951d03c into main May 28, 2026
21 checks passed
@SimplyDanny
SimplyDanny deleted the self-in-generics branch May 28, 2026 21:50
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 false positive for Generics type in extensions

2 participants