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

Add unneeded_override rule #5139

Merged
merged 1 commit into from
Jul 26, 2023
Merged

Add unneeded_override rule #5139

merged 1 commit into from
Jul 26, 2023

Conversation

keith
Copy link
Collaborator

@keith keith commented Jul 21, 2023

This rule flags functions where the only thing they do is call their
super function and therefore could be omitted. For example:

override func foo() {
    super.foo()
}

This can get pretty complex since there are a lot of slight variations
the subclasses' functions can call the superclasses' functions with, but
this covers many of the cases. Ideally this would handle variable
overrides too but it doesn't currently.

@keith keith force-pushed the ks/add-unneeded_override-rule branch from ad64295 to f703595 Compare July 21, 2023 19:58
@SwiftLintBot
Copy link

SwiftLintBot commented Jul 21, 2023

134 Warnings
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/CheckCellView.swift:49:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoSettingsTableSource.swift:18:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoTableSource.swift:19:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/VideoHeaderView.swift:16:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/First time setup/NextViewController.swift:16:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Infos panels/HelpViewController.swift:13:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Aerial: /Resources/MainUI/Settings panels/CompanionCacheViewController.swift:13:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Brave: /Sources/Brave/Frontend/Browser/ButtonToast.swift:144:3: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Brave: /Sources/Data/models/TabMO.swift:58:3: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Brave: /Tests/ClientTests/SearchTests.swift:14:3: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Brave: /Tests/ClientTests/TabSessionTests.swift:81:3: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Brave: /Tests/SharedTests/ArrayExtensionTests.swift:10:3: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Brave: /Tests/SharedTests/ArrayExtensionTests.swift:14:3: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/AutofillListItemTableViewCell.swift:122:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/KeychainItemsDebugViewController.swift:110:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/SaveLoginViewController.swift:64:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGo/SettingsViewController.swift:564:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/PrivacyIconLogicTests.swift:36:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/PrivacyIconLogicTests.swift:40:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/TrackerAnimationLogicTests.swift:33:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in DuckDuckGo: /DuckDuckGoTests/TrackerAnimationLogicTests.swift:37:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in DuckDuckGo: /IntegrationTests/AtbServerTests.swift:41:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /BrowserKit/Tests/TabDataStoreTests/TabDataStoreTests.swift:21:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Client/Frontend/Autofill/CreditCard/CreditCardBottomSheet/CreditCardBottomSheetFooterView.swift:40:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Client/Frontend/Browser/SearchViewController.swift:549:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Client/Frontend/Browser/Tabs/TabCell.swift:153:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Client/Frontend/Settings/Main/About/VersionSetting.swift:27:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Client/Frontend/Settings/TabsSettingsViewControler.swift:41:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Client/Frontend/Settings/ThemeSettings/ThemeSettingsController.swift:66:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /MarketingUITests/MarketingUITests.swift:27:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/ClientTests/CreditCard/CreditCardInputFieldHelperTests.swift:13:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/ClientTests/CreditCard/CreditCardInputFieldHelperTests.swift:17:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/ClientTests/FeatureFlagManagerTests.swift:20:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/ClientTests/Frontend/Home/Pocket/PocketStoryProviderTests.swift:12:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/SharedTests/ArrayExtensionTests.swift:10:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/SharedTests/ArrayExtensionTests.swift:14:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/SharedTests/AsyncReducerTests.swift:11:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/SharedTests/AsyncReducerTests.swift:16:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/StorageTests/DiskImageStoreTests.swift:22:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/StorageTests/TestSQLiteReadingList.swift:21:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/SyncTests/CryptoTests.swift:39:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/SyncTests/CryptoTests.swift:44:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/SyncTests/RustSyncManagerAPITests.swift:12:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /Tests/XCUITests/PerformanceTests.swift:38:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /ThirdParty/Deferred/DeferredTests/DeferredTests.swift:23:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /ThirdParty/Deferred/DeferredTests/DeferredTests.swift:28:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /ThirdParty/Deferred/DeferredTests/LockProtectedTests.swift:23:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Firefox: /ThirdParty/Deferred/DeferredTests/ReadWriteLockTests.swift:62:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Kickstarter: /Kickstarter-iOS/Features/Help/Views/Cells/SettingsTableViewCell.swift:30:3: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Kickstarter: /Kickstarter-iOS/Features/ProjectPage/Views/Cells/ProjectPamphletSubpageCell.swift:81:3: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Kickstarter: /Kickstarter-iOS/Features/ThanksProjects/Controller/ThanksViewController.swift:58:3: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Kickstarter: /bin/StringsScript/Tests/StringsScriptTests/StringsScriptTests.swift:8:3: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Frameworks/Articles/DataTests/DataTests.swift:14:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Frameworks/Articles/DataTests/DataTests.swift:19:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Frameworks/ArticlesDatabase/DatabaseTests/DatabaseTests.swift:14:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Frameworks/ArticlesDatabase/DatabaseTests/DatabaseTests.swift:19:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Mac/MainWindow/About/AboutWindowController.swift:38:2: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Mac/MainWindow/Detail/DetailWebView.swift:58:2: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Mac/Preferences/ExtensionPoints/ExtensionPointMarsEditWindowController.swift:19:2: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Tests/NetNewsWire-iOSTests/NetNewsWire_iOSTests.swift:13:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Tests/NetNewsWire-iOSTests/NetNewsWire_iOSTests.swift:18:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Tests/NetNewsWireTests/ScriptingTests/AppleScriptXCTestCase.swift:13:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Tests/NetNewsWireTests/ScriptingTests/AppleScriptXCTestCase.swift:17:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Tests/NetNewsWireTests/ScriptingTests/ScriptingTests.swift:13:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in NetNewsWire: /Tests/NetNewsWireTests/ScriptingTests/ScriptingTests.swift:17:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /Pocket Casts Watch App Extension/NotificationController.swift:13:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /Pocket Casts Watch App Extension/NotificationController.swift:18:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /Pocket Casts Watch App Extension/PCInterfaceController.swift:5:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /PodcastsIntentsUI/IntentViewController.swift:12:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/AppDelelgate+SiriShortcuts.swift:91:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/AppearanceViewController.swift:66:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/BundlePodcastCell.swift:49:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/CategorySponsoredCell.swift:112:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/ChaptersViewController.swift:11:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/DiscoverPodcastTableCell.swift:54:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/EditFilterNameCell.swift:16:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/PlaylistIconChooserCell.swift:8:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/PodcastSearchCell.swift:59:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/PodcastSupporterCell.swift:40:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/TourViewController.swift:45:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in PocketCasts: /podcasts/WhatsNewDetailViewController.swift:4:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Sourcery: /Sourcery-Example/Sourcery-Example/ViewController.swift:13:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Sourcery: /Sourcery-Example/Sourcery-Example/ViewController.swift:18:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Sourcery: /SourceryRuntime/Sources/AST/Actor.swift:57:9: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Sourcery: /SourceryRuntime/Sources/AST/Class.swift:56:9: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Sourcery: /SourceryRuntime/Sources/AST/Struct.swift:61:9: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in VLC: /Sources/Playback/Queue/QueueViewController.swift:127:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Share Extension/AccountSelectionViewController.swift:49:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/ConfirmAssetViewControllerTests.swift:27:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/ConversationMessageCell/ReadReceiptSystemMessage/ReadReceiptViewModelTests.swift:27:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/DestructionCountdownViewTests.swift:26:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/EmoticonSubstitution/NSString+EmoticonSubstitutionTests.swift:45:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/FullscreenImageViewController/FullscreenImageViewControllerSnapshotTests.swift:26:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/IncomingRequestFooterTests.swift:24:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/MessageReplyPreviewViewTests.swift:37:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/NetworkStatusView/NetworkStatusViewControllerTests.swift:193:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/ProfileFooterViewTests.swift:24:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/SearchGroup/SearchGroupSelectorSnapshotTests.swift:26:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/UITraitEnvironmentTests.swift:27:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/UserClientCellTests.swift:24:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS Tests/Views/RoundedSegmentedViewTests.swift:26:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS/Sources/Authentication/Interface/ViewControllers/AuthenticationStepController.swift:116:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in Wire: /Wire-iOS/Sources/UserInterface/Folders/FolderPickerViewController.swift:64:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Gutenberg/GutenbergViewController.swift:391:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Jetpack/Jetpack Restore/Restore Complete/JetpackBackupCompleteViewController.swift:36:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Jetpack/Jetpack Restore/Restore Complete/JetpackRestoreCompleteViewController.swift:31:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Jetpack/Jetpack Restore/Restore Complete/JetpackRestoreFailedViewController.swift:30:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Jetpack/Jetpack Restore/Restore Status Failed/JetpackBackupStatusFailedViewController.swift:27:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Jetpack/Jetpack Restore/Restore Status Failed/JetpackRestoreStatusFailedViewController.swift:27:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Jetpack/Jetpack Settings/JetpackConnectionViewController.swift:52:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Jetpack/Jetpack Settings/JetpackConnectionViewController.swift:56:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Jetpack/Jetpack Settings/JetpackSettingsViewController.swift:58:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Pages/PageListViewController.swift:1054:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Pages/PageListViewController.swift:814:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Post/PostListTableViewHandler.swift:50:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/Classes/ViewRelated/Views/RichTextView/AnimatedGifAttachmentViewProvider.swift:29:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressShareExtension/ShareExtensionEditorViewController.swift:202:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressTest/ActivityContentRouterTests.swift:14:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressTest/ActivityLogRangesTest.swift:12:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ This PR introduced a violation in WordPress: /WordPress/WordPressTest/ActivityLogRangesTest.swift:8:5: warning: Unneeded Overridden Functions Violation: Remove overridden functions that don't do anything except call their super (unneeded_override)
⚠️ Danger found 134 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 120.
17 Messages
📖 Linting Aerial with this PR took 1.11s vs 1.12s on main (0% faster)
📖 Linting Alamofire with this PR took 1.44s vs 1.43s on main (0% slower)
📖 Linting Brave with this PR took 8.12s vs 8.07s on main (0% slower)
📖 Linting DuckDuckGo with this PR took 3.94s vs 3.94s on main (0% slower)
📖 Linting Firefox with this PR took 9.51s vs 9.52s on main (0% faster)
📖 Linting Kickstarter with this PR took 10.36s vs 10.34s on main (0% slower)
📖 Linting Moya with this PR took 0.59s vs 0.59s on main (0% slower)
📖 Linting NetNewsWire with this PR took 3.11s vs 3.11s on main (0% slower)
📖 Linting Nimble with this PR took 0.76s vs 0.76s on main (0% slower)
📖 Linting PocketCasts with this PR took 8.05s vs 8.01s on main (0% slower)
📖 Linting Quick with this PR took 0.38s vs 0.38s on main (0% slower)
📖 Linting Realm with this PR took 11.17s vs 11.13s on main (0% slower)
📖 Linting Sourcery with this PR took 2.3s vs 2.3s on main (0% slower)
📖 Linting Swift with this PR took 5.18s vs 5.2s on main (0% faster)
📖 Linting VLC with this PR took 1.4s vs 1.4s on main (0% slower)
📖 Linting Wire with this PR took 8.58s vs 8.59s on main (0% faster)
📖 Linting WordPress with this PR took 12.37s vs 12.39s on main (0% faster)

Generated by 🚫 Danger

@keith keith force-pushed the ks/add-unneeded_override-rule branch 3 times, most recently from 8c0f207 to 86b8ed6 Compare July 21, 2023 20:41
Copy link
Collaborator

@SimplyDanny SimplyDanny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this!

Did you think about adding a rewriter removing the superfluous overrides when running in --fix mode?

Also, don't forget the CHANGELOG entry. 😉

@keith keith force-pushed the ks/add-unneeded_override-rule branch from fde0577 to 21cccce Compare July 26, 2023 17:18
@keith
Copy link
Collaborator Author

keith commented Jul 26, 2023

Thanks for the review! I implemented fixing

@keith keith requested a review from SimplyDanny July 26, 2023 17:18
Copy link
Collaborator

@SimplyDanny SimplyDanny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All triggering examples miss the violation marker .

Other than that, it seems to be good to go.

This rule flags functions where the only thing they do is call their
super function and therefore could be omitted. For example:

```swift
override func foo() {
    super.foo()
}
```

This can get pretty complex since there are a lot of slight variations
the subclasses' functions can call the superclasses' functions with, but
this covers many of the cases. Ideally this would handle variable
overrides too but it doesn't currently.
@keith keith force-pushed the ks/add-unneeded_override-rule branch from 21cccce to 171f125 Compare July 26, 2023 19:13
@keith keith enabled auto-merge (squash) July 26, 2023 19:14
@keith keith merged commit b3189aa into main Jul 26, 2023
@keith keith deleted the ks/add-unneeded_override-rule branch July 26, 2023 19:36
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.

3 participants