Improve unused helper methods workflow

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

The following discussions from !191214 (merged) should be addressed:

  • @splattael started a discussion:

    Suggestion (non-blocking) Applying the following diff (which misspells an entry) makes the script pass:

    diff --git a/.gitlab/lint/unused_helper_methods/potential_methods_to_remove.yml b/.gitlab/lint/unused_helper_methods/potential_methods_to_remove.yml
    index b3f4e65d71f1..2aa88d88c0c6 100644
    --- a/.gitlab/lint/unused_helper_methods/potential_methods_to_remove.yml
    +++ b/.gitlab/lint/unused_helper_methods/potential_methods_to_remove.yml
    @@ -5,7 +5,7 @@
     # If it turns out that a method you are attempting to remove is in fact in use,
     #   remove it from this file and add it to `excluded_methods.yml`.
     #
    -tag_pair_for_link:
    +txag_pair_for_link:
       file: ee/app/helpers/admin/application_settings_helper.rb
     start_free_trial_data:
       file: ee/app/helpers/billing_plans_helper.rb

    I wonder if we could compare file names instead of counts.

    This could be a follow-up though 💪

  • @splattael started a discussion:

    Suggestion (non-blocking) Thoughts on add the entries directly to potential_methods_to_remove.yml to make developers life a tad easier? 😅

    We are doing something similar in https://gitlab.com/gitlab-org/gitlab/-/blob/2f3ac4c30b321fb872124685783633eab5338303/scripts/rspec_check_order_dependence where entries are removed from YAML.

Edited by 🤖 GitLab Bot 🤖