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

refactor: Remove unused code #1409

Merged
merged 4 commits into from
May 2, 2024
Merged

refactor: Remove unused code #1409

merged 4 commits into from
May 2, 2024

Conversation

PhilippeWeidmann
Copy link
Member

@PhilippeWeidmann PhilippeWeidmann commented May 2, 2024

Remove some (not all) of the unused code detected by periphery.

PR has separated commits for areas that are considered touchy

Copy link

github-actions bot commented May 2, 2024

Found 52 unused code occurences

Expand
Mail/Helpers/MailTargetAssembly.swift:57:7: warning: Class 'MailTargetAssembly' is unused
Mail/Helpers/RichTextEditor.swift:268:10: warning: Function 'moveCursorToEnd(completion:)' is unused
Mail/Helpers/RichTextEditor.swift:272:10: warning: Function 'addBold(completion:)' is unused
Mail/Helpers/RichTextEditor.swift:280:10: warning: Function 'removeList(completion:)' is unused
Mail/MailApp.swift:28:17: warning: Property 'dependencyInjectionHook' is unused
Mail/Utils/IntentViewable.swift:24:9: warning: Property 'resolvedIntent' is unused
Mail/Utils/IntentViewable.swift:25:10: warning: Function 'initFromIntent()' is unused
Mail/Views/AI Writer/Prompt/AIEngineOptionButton.swift:31:18: warning: Property 'isShowingAIEngineChoice' is assigned, but never used
Mail/Views/Menu Drawer/FolderListViewModel.swift:35:17: warning: Property 'foldersObservationToken' is assigned, but never used
Mail/Views/New Message/Attachments/AttachmentsManager.swift:28:21: warning: Protocol 'AttachmentsManageable' is redundant as it's never used as an existential type
Mail/Views/New Message/Attachments/AttachmentsManager.swift:63:62: warning: Protocol 'AttachmentsManageable' conformance is redundant
Mail/Views/New Message/Attachments/AttachmentsManager.swift:63:62: warning: Protocol 'AttachmentsManageable' conformance is redundant
Mail/Views/New Message/ComposeMessageIntentView.swift:43:9: warning: Property 'htmlAttachments' is assigned, but never used
Mail/Views/New Message/Recipients/RecipientChip.swift:34:21: warning: Property 'focusedField' is assigned, but never used
Mail/Views/New Message/Select Mailbox/SelectComposeMailboxView.swift:32:18: warning: Property 'composeMessageIntent' is assigned, but never used
Mail/Views/Onboarding/OnboardingView.swift:350:8: warning: Struct 'OnboardingView_Previews' is unused
Mail/Views/Onboarding/SlideView.swift:117:8: warning: Struct 'SlideView_Previews' is unused
Mail/Views/SplitView.swift:334:51: warning: Parameter 'notification' is unused
Mail/Views/Switch User/AccountListView.swift:39:17: warning: Property 'mailboxObservationToken' is assigned, but never used
Mail/Views/Thread List/FlushFolderView.swift:41:18: warning: Property 'flushAlert' is assigned, but never used
Mail/Views/Thread List/ThreadListHeader.swift:36:17: warning: Property 'folderObservation' is assigned, but never used
Mail/Views/Thread/Message/Attachment/AttachmentsView.swift:30:24: warning: Property 'showDocumentPicker' is unused
Mail/Views/Thread/Message/Calendar/CalendarAttendeeAvatarView.swift:29:17: warning: Property 'hasChoice' is unused
Mail/Views/Thread/Message/MessageBodyView.swift:36:18: warning: Property 'displayContentBlockedActionView' is assigned, but never used
Mail/Views/Thread/Message/MessageHeader/MessageHeaderSummaryView.swift:140:8: warning: Struct 'MessageHeaderSummaryView_Previews' is unused
Mail/Views/Thread/Message/MessageView.swift:157:8: warning: Struct 'MessageView_Previews' is unused
Mail/Views/Thread/OpenThreadIntentView.swift:41:13: warning: Property 'threadObservation' is assigned, but never used
MailAppIntentsExtension/MailAppIntentsExtension.swift:24:17: warning: Property 'dependencyInjectionHook' is unused
MailAppIntentsExtension/MailAppIntentsTargetAssembly.swift:22:7: warning: Class 'MailAppIntentsTargetAssembly' is unused
MailAppIntentsExtension/MailSetFocusFilterIntent.swift:27:16: warning: Property 'description' is unused
MailCore/API/MailApiFetcher/MailApiFetcher+AI.swift:25:18: warning: Function 'authenticatedAIRequest(_:method:parameters:)' is unused
MailCore/API/MailError.swift:98:9: warning: Property 'httpStatus' is assigned, but never used
MailCore/Cache/MailboxManager/MailboxManager.swift:28:28: warning: Property 'snackbarPresenter' is unused
MailCore/Models/AI/AIMessage.swift:30:9: warning: Property 'recipient' is assigned, but never used
MailCore/Models/Contact/CommonContact.swift:36:17: warning: Function 'from(contactConfiguration:)' is unused
MailCore/Models/Draft.swift:184:29: warning: Parameter 'isOffline' is unused
MailCore/Models/Message.swift:413:9: warning: Parameter 'safeDisplay' is unused
MailCore/Models/Request Body/NewContact.swift:23:13: warning: Property 'value' is assigned, but never used
MailCore/Models/Request Body/NewContact.swift:24:13: warning: Property 'type' is unused
MailCore/Models/Request Body/NewContact.swift:27:9: warning: Property 'firstname' is assigned, but never used
MailCore/Models/Request Body/NewContact.swift:28:9: warning: Property 'lastname' is assigned, but never used
MailCore/Models/Request Body/NewContact.swift:29:9: warning: Property 'emails' is assigned, but never used
MailCore/Models/Request Body/NewContact.swift:30:9: warning: Property 'addressbookId' is assigned, but never used
MailCore/Models/Request Body/NewFolder.swift:22:9: warning: Property 'name' is assigned, but never used
MailCore/Models/Request Body/NewFolder.swift:23:9: warning: Property 'path' is assigned, but never used
MailCore/Utils/IdentifiableURLs.swift:30:8: warning: Struct 'IdentifiableURLComponents' is unused
MailCore/Utils/SnackBar/IKSnackBar+Extension.swift:60:9: warning: Parameter 'anchor' is unused
MailNotificationServiceExtension/NotificationService.swift:31:17: warning: Property 'dependencyInjectionHook' is unused
MailNotificationServiceExtension/NotificationServiceAssembly.swift:27:7: warning: Class 'NotificationServiceTargetAssembly' is unused
MailShareExtension/MailShareExtensionTargetAssembly.swift:22:7: warning: Class 'MailShareExtensionTargetAssembly' is unused
MailShareExtension/Proxy/URLOpener.swift:24:9: warning: Property 'extensionContext' is assigned, but never used
MailShareExtension/ShareViewController.swift:29:17: warning: Property 'dependencyInjectionHook' is unused

Copy link

sonarcloud bot commented May 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@PhilippeWeidmann PhilippeWeidmann marked this pull request as ready for review May 2, 2024 09:11
@PhilippeWeidmann PhilippeWeidmann marked this pull request as draft May 2, 2024 09:40
@PhilippeWeidmann PhilippeWeidmann marked this pull request as ready for review May 2, 2024 09:46
@PhilippeWeidmann PhilippeWeidmann merged commit c11711c into master May 2, 2024
7 checks passed
@PhilippeWeidmann PhilippeWeidmann deleted the remove-unused-code branch May 2, 2024 09:46
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.

None yet

2 participants