realm / SwiftLint

A tool to enforce Swift style and conventions.
https://realm.github.io/SwiftLint
MIT License
18.61k stars 2.22k forks source link

Respect array types in `redundant_type_annotation` rule #5536

Closed SimplyDanny closed 5 months ago

SimplyDanny commented 5 months ago

Fixes #3141.

Also try to change the implementation slightly by focusing on the important aspects of the rule (i.e. extracting type names) in separate methods.

SwiftLintBot commented 5 months ago
22 Warnings
:warning: This PR may need tests.
:warning: This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:20:23: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Brave: /Sources/Brave/Frontend/Browser/Tabs/TabTray/Views/TabTrayCell.swift:33:14: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Firefox: /firefox-ios/Client/Frontend/Autofill/CreditCard/CreditCardBottomSheet/CreditCardBottomSheetViewModel.swift:78:26: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Firefox: /firefox-ios/Client/Frontend/Autofill/CreditCard/CreditCardSettingsView/CreditCardTableViewModel.swift:14:20: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Firefox: /firefox-ios/Client/Frontend/Home/JumpBackIn/Data/JumpBackInDataAdaptor.swift:26:27: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Firefox: /firefox-ios/Client/Frontend/Home/JumpBackIn/JumpBackInViewModel.swift:34:19: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Firefox: /firefox-ios/Client/Frontend/Library/Downloads/DownloadsPanel.swift:24:27: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Firefox: /firefox-ios/Client/Frontend/Library/ReaderPanel.swift:183:27: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Firefox: /firefox-ios/Client/Frontend/Library/RecentlyClosedTabsPanel.swift:30:27: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Firefox: /firefox-ios/Client/TabManagement/Tab.swift:120:28: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Firefox: /firefox-ios/Client/TabManagement/Tab.swift:125:36: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Firefox: /firefox-ios/Client/Utils/SearchTermGroupsUtility.swift:125:26: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Kickstarter: /Kickstarter-iOS/Features/Discovery/Views/Cells/DiscoveryProjectCardCell.swift:22:39: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Kickstarter: /Library/ViewModels/CategorySelectionViewModel.swift:177:28: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in NetNewsWire: /Shared/Activity/ActivityManager.swift:140:11: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in VLC: /Sources/Playback/Control/VLCRendererDiscovererManager.swift:20:26: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in VLC: /Sources/Playback/Control/VLCRendererDiscovererManager.swift:39:30: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Wire: /wire-ios-cryptobox/WireCryptobox/ChaCha20Poly1305/StreamEncryption.swift:92:25: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Wire: /wire-ios-cryptobox/WireCryptobox/ChaCha20Poly1305/StreamEncryption.swift:93:25: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in Wire: /wire-ios/Wire-iOS/Sources/UserInterface/Collections/CollectionViewLeftAlignedFlowLayout.swift:33:26: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
:warning: This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Blog/SharingButtonsViewController.swift:777:17: warning: Redundant Type Annotation Violation: Variables should not have redundant type annotation (redundant_type_annotation)
17 Messages
:book: Linting Aerial with this PR took 0.18s vs 0.17s on main (5% slower)
:book: Linting Alamofire with this PR took 0.16s vs 0.16s on main (0% slower)
:book: Linting Brave with this PR took 0.68s vs 0.68s on main (0% slower)
:book: Linting DuckDuckGo with this PR took 0.54s vs 0.54s on main (0% slower)
:book: Linting Firefox with this PR took 1.19s vs 1.19s on main (0% slower)
:book: Linting Kickstarter with this PR took 0.75s vs 0.75s on main (0% slower)
:book: Linting Moya with this PR took 0.11s vs 0.11s on main (0% slower)
:book: Linting NetNewsWire with this PR took 0.29s vs 0.29s on main (0% slower)
:book: Linting Nimble with this PR took 0.13s vs 0.13s on main (0% slower)
:book: Linting PocketCasts with this PR took 0.66s vs 0.65s on main (1% slower)
:book: Linting Quick with this PR took 0.1s vs 0.1s on main (0% slower)
:book: Linting Realm with this PR took 0.52s vs 0.51s on main (1% slower)
:book: Linting Sourcery with this PR took 0.31s vs 0.32s on main (3% faster)
:book: Linting Swift with this PR took 0.44s vs 0.44s on main (0% slower)
:book: Linting VLC with this PR took 0.18s vs 0.18s on main (0% slower)
:book: Linting Wire with this PR took 1.74s vs 1.73s on main (0% slower)
:book: Linting WordPress with this PR took 1.05s vs 1.05s on main (0% slower)

Generated by :no_entry_sign: Danger