Experiment to identify dead code in our backend codebase
Context
It was mentioned in a recent meeting that a pet peeve was that sometimes we have HAML partials/Rails helpers that are never called. This is dead code that could be removed from the codebase.
Goal
Experiment with the following tools to try to remove code that isn't used anywhere:
- https://github.com/seattlerb/debride
- https://github.com/unused-code/unused
- https://github.com/danmayer/coverband
Unused Helpers
Updated 1 Jan 2024
Found 52 unused helpers:
-
ee/app/helpers/ee/auth_helper.rb
:kerberos_enabled?
-
ee/app/helpers/ee/environments_helper.rb
:can_approve_deployment?
-
ee/app/helpers/ee/geo_helper.rb
:geo_registry_status
-
ee/app/helpers/ee/gitlab_routing_helper.rb
:geo_primary_http_internal_url_to_repo
-
ee/app/helpers/ee/gitlab_routing_helper.rb
:project_vulnerability_path
-
ee/app/helpers/ee/gitlab_routing_helper.rb
:user_group_saml_omniauth_metadata_path
-
ee/app/helpers/path_locks_helper.rb
:text_label_for_lock
-
app/helpers/application_settings_helper.rb
:anti_spam_service_enabled?
-
app/helpers/application_settings_helper.rb
:deprecated_attributes
-
app/helpers/application_settings_helper.rb
:instance_clusters_enabled?
-
app/helpers/avatars_helper.rb
:group_icon
-
app/helpers/avatars_helper.rb
:topic_icon
-
app/helpers/branches_helper.rb
:project_branches
-
app/helpers/ci/pipelines_helper.rb
:pipeline_warnings
-
app/helpers/ci/variables_helper.rb
:ci_variable_protected?
-
app/helpers/count_helper.rb
:approximate_fork_count_with_delimiters
-
app/helpers/events_helper.rb
:event_feed_title
-
app/helpers/events_helper.rb
:event_feed_summary
-
app/helpers/registrations_helper.rb
:oauth_tracking_label;
-
app/helpers/routing/groups/members_helper.rb
:request_access_group_members_path
-
app/helpers/routing/groups/members_helper.rb
:approve_access_request_group_member_path
-
app/helpers/routing/groups/members_helper.rb
:resend_invite_group_member_path
-
app/helpers/routing/members_helper.rb
:source_members_url
-
app/helpers/routing/pipeline_schedules_helper.rb
:edit_pipeline_schedule_path
-
app/helpers/routing/pipeline_schedules_helper.rb
:play_pipeline_schedule_path
-
app/helpers/routing/pipeline_schedules_helper.rb
:take_ownership_pipeline_schedule_path
-
app/helpers/routing/projects/members_helper.rb
:request_access_project_members_path
-
app/helpers/routing/projects/members_helper.rb
:leave_project_members_path
-
app/helpers/routing/projects/members_helper.rb
:approve_access_request_project_member_path
-
app/helpers/routing/projects/members_helper.rb
:resend_invite_project_member_path
-
app/helpers/routing/snippets_helper.rb
:gitlab_dashboard_snippets_path
-
app/helpers/routing/snippets_helper.rb
:gitlab_raw_snippet_path
-
app/helpers/routing/snippets_helper.rb
:gitlab_raw_snippet_blob_path
-
app/helpers/routing/snippets_helper.rb
:gitlab_snippet_notes_url
-
app/helpers/routing/snippets_helper.rb
:gitlab_snippet_note_url
-
app/helpers/routing/snippets_helper.rb
:gitlab_toggle_award_emoji_snippet_note_url
-
app/helpers/routing/snippets_helper.rb
:gitlab_toggle_award_emoji_snippet_path
-
app/helpers/routing/snippets_helper.rb
:gitlab_toggle_award_emoji_snippet_url
-
app/helpers/routing/snippets_helper.rb
:toggle_award_emoji_personal_snippet_path
-
app/helpers/routing/snippets_helper.rb
:toggle_award_emoji_project_project_snippet_path
-
app/helpers/routing/snippets_helper.rb
:toggle_award_emoji_project_project_snippet_url
-
app/helpers/search_helper.rb
:search_filter_link
-
app/helpers/sessions_helper.rb
:recently_confirmed_com?
-
app/helpers/sidebars_helper.rb
:sidebar_tracking_attributes_by_object
-
app/helpers/sidebars_helper.rb
:scope_avatar_classes
-
app/helpers/sorting_titles_values_helper.rb
:sort_value_stars_asc
-
app/helpers/submodule_helper.rb
:submodule_links_for_url
-
app/helpers/timeboxes_helper.rb
:group_or_project_milestone_path
-
app/helpers/timeboxes_helper.rb
:can_admin_project_milestones?
-
app/helpers/tree_helper.rb
:edit_in_new_fork_notice_action
-
app/helpers/url_helper.rb
:escaped_url
-
app/helpers/webpack_helper.rb
:webpack_public_path
Edited by Peter Leitzen