Skip to content

Re-enable Style/MutableConstant and Style/RedundantFreeze in Ruby 3.0

What does this MR do and why?

Follow-up of !98669 (merged).

This MR enables Style/MutableConstant and Style/RedundantFreeze in Ruby 3.0 only.

To avoid failing RuboCop CI jobs for Ruby 2.7 we are now enabling these rules in Ruby 3.0 and disable them in Ruby 2.7. The opposite what we've done previously.

Both cops are put in "grace period" so don't fail in CI on master.

Cop rule caveats related to 2.7 vs 3.0

From https://docs.rubocop.org/rubocop/cops_style.html#stylemutableconstant:

  • Regexp and Range literals are frozen objects since Ruby 3.0.
  • From Ruby 3.0, interpolated strings are not frozen when # frozen-string-literal: true is used, so this cop enforces explicit freezing for such strings.
  • From Ruby 3.0, this cop allows explicit freezing of constants when the shareable_constant_value directive is used.

From https://docs.rubocop.org/rubocop/cops_style.html#styleredundantfreeze

  • Regexp and Range literals are frozen objects since Ruby 3.0.
  • From Ruby 3.0, this cop allows explicit freezing of interpolated string literals when # frozen-string-literal: true is used.

Offenses

The current offenses will be fixed in follow-up MRs.

285 files inspected, 469 offenses detected, 469 offenses autocorrectable

Click to expand
Inspecting 285 files
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

Offenses:

app/controllers/help_controller.rb:12:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  YAML_FRONT_MATTER_REGEXP = /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/import/bitbucket_server_controller.rb:25:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  VALID_BITBUCKET_PROJECT_CHARS = /\A~?[\w\-\.\s]+\z/.freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/import/bitbucket_server_controller.rb:26:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  VALID_BITBUCKET_CHARS = /\A[\w\-\.\s]+\z/.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^
app/finders/group_members_finder.rb:6:37: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
  INVALID_RELATION_TYPE_ERROR_MSG = "is not a valid relation type. Valid relation types are #{RELATIONS.join(', ')}."
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/finders/issuable_finder.rb:50:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  FULL_TEXT_SEARCH_TERM_REGEX = /\A#{FULL_TEXT_SEARCH_TERM_PATTERN}\z/.freeze
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/finders/repositories/changelog_commits_finder.rb:24:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    REVERT_REGEX = /^This reverts commit (?<sha>[0-9a-f]{40})/i.freeze
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/graphql/mutations/container_repositories/destroy_tags.rb:9:37: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      TOO_MANY_TAGS_ERROR_MESSAGE = "Number of tags is greater than #{LIMIT}"
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/graphql/mutations/members/groups/bulk_update.rb:39:36: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MAX_MEMBERS_UPDATE_ERROR = "Count of members to be updated should be less than #{MAX_MEMBERS_UPDATE_LIMIT}."
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/graphql/mutations/packages/bulk_destroy.rb:9:28: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      TOO_MANY_IDS_ERROR = "Cannot delete more than #{MAX_PACKAGES} packages"
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/auth_helper.rb:22:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  LDAP_PROVIDER = /\Aldap/.freeze
                  ^^^^^^^^^^^^^^^
app/helpers/blame_helper.rb:7:29: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
  COMMIT_BLOCK_HEIGHT_EXP = "(#{BODY_FONT_SIZE} * #{COMMIT_LINE_HEIGHT}) + #{COMMIT_PADDING}"
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/colors_helper.rb:4:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  HEX_COLOR_PATTERN = /\A\#(?:[0-9A-Fa-f]{3}){1,2}\Z/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/helpers/sidekiq_helper.rb:4:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  SIDEKIQ_PS_REGEXP = %r{\A ...
                      ^^^^^
app/models/application_setting_implementation.rb:7:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  STRING_LIST_SEPARATOR = %r{\s*[,;]\s*     # comma or semicolon, optionally surrounded by whitespace ...
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/badge.rb:21:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  PLACEHOLDERS_REGEX = /(#{PLACEHOLDERS.keys.join('|')})/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/blob_viewer/go_mod.rb:8:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    MODULE_REGEX = %r{ ...
                   ^^^
app/models/ci/build_trace_chunks/redis_base.rb:7:26: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      LUA_APPEND_CHUNK = <<~EOS
                         ^^^^^^
app/models/ci/runner.rb:47:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    UPDATE_CONTACT_COLUMN_EVERY = (40.minutes..55.minutes).freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/commit_range.rb:31:17: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  REF_PATTERN = /[0-9a-zA-Z][0-9a-zA-Z_.-]*[0-9a-zA-Z\^]/.freeze
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/commit_range.rb:32:13: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  PATTERN = /#{REF_PATTERN}\.{2,3}#{REF_PATTERN}/.freeze
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/commit_range.rb:36:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  STRICT_PATTERN = /\h{7,40}\.{2,3}\h{7,40}/.freeze
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/commit.rb:32:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  COMMIT_SHA_PATTERN = /\h{#{MIN_SHA_LENGTH},40}/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/commit.rb:33:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  EXACT_COMMIT_SHA_PATTERN = /\A#{COMMIT_SHA_PATTERN}\z/.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/commit.rb:35:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  LINK_EXTENSION_PATTERN = /(patch)/.freeze
                           ^^^^^^^^^^^^^^^^
app/models/commit.rb:538:17: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  DRAFT_REGEX = /\A\s*#{Gitlab::Regex.merge_request_draft}|(fixup!|squash!)\s/.freeze
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/ci/maskable.rb:14:13: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    REGEX = %r{\A[a-zA-Z0-9_+=/@:.~-]{8,}\z}.freeze
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/ci/maskable.rb:19:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    MASK_AND_RAW_REGEX = %r{\A\S{8,}\z}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/pg_full_text_searchable.rb:24:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  LONG_WORDS_REGEX = %r([A-Za-z0-9+/@]{50,}).freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/pg_full_text_searchable.rb:27:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  URL_SCHEME_REGEX = %r{(?<=\A|\W)\w+://(?=\w+)}.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/pg_full_text_searchable.rb:28:41: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  TSQUERY_DISALLOWED_CHARACTERS_REGEX = %r{[^a-zA-Z0-9 .@/\-_"]}.freeze
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/redactable.rb:13:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  UNSUBSCRIBE_PATTERN = %r{/sent_notifications/\h{32}/unsubscribe}.freeze
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/taskable.rb:14:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  COMPLETE_PATTERN   = /\[[xX]\]/.freeze
                       ^^^^^^^^^^^^^^^^^
app/models/concerns/taskable.rb:15:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  INCOMPLETE_PATTERN = /\[[[:space:]]\]/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/taskable.rb:16:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  ITEM_PATTERN       = %r{ ...
                       ^^^
app/models/custom_emoji.rb:4:17: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  NAME_REGEXP = /[a-z0-9_-]+/.freeze
                ^^^^^^^^^^^^^^^^^^^^
app/models/design_management/repository.rb:11:30: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    MANAGED_GIT_ATTRIBUTES = <<~GA
                             ^^^^^
app/models/environment_status.rb:81:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  PAGE_EXTENSIONS = /\A\.(s?html?|php|asp|cgi|pl)\z/i.freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/error_tracking/project_error_tracking_setting.rb:14:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    API_URL_PATH_REGEXP = %r{ ...
                          ^^^
app/models/hooks/web_hook.rb:151:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  VARIABLE_REFERENCE_RE = /\{([A-Za-z]+[0-9]*(?:[._-][A-Za-z0-9]+)*)\}/.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/apple_app_store.rb:7:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    ISSUER_ID_REGEX = /\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/apple_app_store.rb:8:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    KEY_ID_REGEX = /\A(?=.*[A-Z])(?=.*[0-9])[A-Z0-9]+\z/.freeze
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/campfire.rb:5:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    SUBDOMAIN_REGEXP = %r{\A[a-z](?:[a-z0-9-]*[a-z0-9])?\z}i.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/chat_message/base_message.rb:6:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      RELATIVE_LINK_REGEX = %r{!\[[^\]]*\]\((/uploads/[^\)]*)\)}.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/confluence.rb:5:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    VALID_SCHEME_MATCH = %r{\Ahttps?\Z}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/confluence.rb:6:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    VALID_HOST_MATCH = %r{\A.+\.atlassian\.net\Z}.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/confluence.rb:7:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    VALID_PATH_MATCH = %r{\A/wiki(/|\Z)}.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/datadog.rb:9:25: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    URL_API_KEYS_DOCS = "https://docs.#{DEFAULT_DOMAIN}/account_management/api-app-keys/"
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/datadog.rb:15:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    TAG_KEY_VALUE_RE = %r{\A [\w-]+ : .*\S.* \z}x.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/discord.rb:7:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    ATTACHMENT_REGEX = /: (?<entry>.*?)\n - (?<name>.*)\n*/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/field.rb:5:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    SECRET_NAME = %r/token|key|password|passphrase|secret/.freeze
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/integrations/teamcity.rb:9:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    TEAMCITY_SAAS_HOSTNAME = /\A[^\.]+\.teamcity\.com\z/i.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/license_template.rb:5:5: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    %r{[\<\{\[] ...
    ^^^^^^^^^^^
app/models/license_template.rb:9:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  YEAR_TEMPLATE_REGEX = /[<{\[](year|yyyy)[>}\]]/i.freeze
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/license_template.rb:11:5: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    %r{[\<\{\[] ...
    ^^^^^^^^^^^
app/models/members/group_member.rb:9:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  SOURCE_TYPE_FORMAT = /\ANamespace\z/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^
app/models/members/project_member.rb:6:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  SOURCE_TYPE_FORMAT = /\AProject\z/.freeze
                       ^^^^^^^^^^^^^^^^^^^^
app/models/merge_request.rb:611:17: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  DRAFT_REGEX = /\A*#{Gitlab::Regex.merge_request_draft}+\s*/i.freeze
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/namespaces/randomized_suffix_path.rb:6:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    LEADING_ZEROS = /^0+/.freeze
                    ^^^^^^^^^^^^
app/models/note.rb:27:36: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  ISSUE_TASK_SYSTEM_NOTE_PATTERN = /\A.*marked\sthe\stask.+as\s(completed|incomplete).*\z/.freeze
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/packages/debian/file_entry.rb:9:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      FILENAME_REGEX = %r{\A[a-zA-Z0-9][a-zA-Z0-9_.~+-]*\z}.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/packages/debian.rb:5:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    DISTRIBUTION_REGEX = %r{[a-z0-9][a-z0-9.-]*}i.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/packages/debian.rb:7:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    ARCHITECTURE_REGEX = %r{[a-z0-9][-a-z0-9]*}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/packages/debian.rb:9:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    LETTER_REGEX = %r{(lib)?[a-z0-9]}.freeze
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/personal_access_token.rb:15:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  TOKEN_LENGTH_RANGE = (20..40).freeze
                       ^^^^^^^^^^^^^^^
app/models/releases/link.rb:11:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    FILEPATH_REGEX = %r{\A\/[^\/](?!.*\/\/.*)[\-\.\w\/]+[\da-zA-Z]+\z}.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/serverless/domain_cluster.rb:7:18: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    HEX_REGEXP = %r{\A\h+\z}.freeze
                 ^^^^^^^^^^^^^^^^^^
app/models/serverless/domain.rb:7:14: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    REGEXP = %r{^(?<scheme>https?://)?(?<function_name>[^.]+)-(?<cluster_left>\h{2})a1(?<cluster_middle>\h{10})f2(?<cluster_right>\h{2})(?<environment_id>\h+)-(?<environment_slug>[^.]+)\.(?<pages_domain_name>.+)}.freeze
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/snippet_repository.rb:8:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  EMPTY_FILE_PATTERN = /^#{DEFAULT_EMPTY_FILE_NAME}(\d+)\.txt$/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/terraform/state.rb:8:18: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    HEX_REGEXP = %r{\A\h+\z}.freeze
                 ^^^^^^^^^^^^^^^^^^
app/presenters/packages/helm/index_presenter.rb:10:27: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      INDEX_YAML_SUFFIX = "/#{CHANNEL}/index.yaml"
                          ^^^^^^^^^^^^^^^^^^^^^^^^
app/services/clusters/agent_tokens/track_usage_service.rb:7:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      UPDATE_USED_COLUMN_EVERY = (40.minutes..55.minutes).freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/error_tracking/list_projects_service.rb:5:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    MASKED_TOKEN_REGEX = /\A\*+\z/.freeze
                         ^^^^^^^^^^^^^^^^
app/services/grafana/proxy_service.rb:18:36: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    SUPPORTED_DATASOURCE_PATTERN = %r{\A\d+\z}.freeze
                                   ^^^^^^^^^^^^^^^^^^
app/services/import/validate_remote_git_endpoint_service.rb:10:38: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    GIT_EXPECTED_FIRST_PACKET_LINE = "# service=#{GIT_SERVICE_NAME}"
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/import/validate_remote_git_endpoint_service.rb:11:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    GIT_BODY_MESSAGE_REGEXP = /^[0-9a-f]{4}#{GIT_EXPECTED_FIRST_PACKET_LINE}/.freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/import/validate_remote_git_endpoint_service.rb:15:29: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    EXPECTED_CONTENT_TYPE = "application/x-#{GIT_SERVICE_NAME}-advertisement"
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/issues/base_service.rb:24:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    NO_REBALANCING_NEEDED = ((RelativePositioning::MIN_POSITION * 0.9999)..(RelativePositioning::MAX_POSITION * 0.9999)).freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/packages/debian/process_package_file_service.rb:9:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SOURCE_FIELD_SPLIT_REGEX = /[ ()]/.freeze
                                 ^^^^^^^^^^^^^^
app/services/packages/maven/metadata/append_package_file_service.rb:10:25: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MD5_FILE_NAME = "#{Metadata.filename}.md5"
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/packages/maven/metadata/append_package_file_service.rb:11:26: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        SHA1_FILE_NAME = "#{Metadata.filename}.sha1"
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/packages/maven/metadata/append_package_file_service.rb:12:28: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        SHA256_FILE_NAME = "#{Metadata.filename}.sha256"
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/packages/maven/metadata/append_package_file_service.rb:13:28: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        SHA512_FILE_NAME = "#{Metadata.filename}.sha512"
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/projects/import_error_filter.rb:7:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    ERROR_MESSAGE_FILTER = /[^\s]*#{File::SEPARATOR}[^\s]*(?=(\s|\z))/.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/projects/lfs_pointers/lfs_object_download_list_service.rb:12:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      LFS_ENDPOINT_PATTERN = /^\t?url\s*=\s*(.+)$/.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/prometheus/proxy_variable_substitution_service.rb:7:36: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    VARIABLE_INTERPOLATION_REGEX = / ...
                                   ^
app/uploaders/file_uploader.rb:23:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  DYNAMIC_PATH_PATTERN = %r{.*(?<secret>\b(\h{10}|\h{32}))\/(?<identifier>.*)}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/uploaders/file_uploader.rb:24:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  VALID_SECRET_PATTERN = %r{\A\h{10,32}\z}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^
app/validators/certificate_fingerprint_validator.rb:4:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  FINGERPRINT_PATTERN = /\A([a-zA-Z0-9]{2}[\s\-:]?){16,}\z/.freeze
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/validators/json_schema_validator.rb:13:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  FILENAME_ALLOWED = /\A[a-z0-9_-]*\Z/.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^
app/validators/line_code_validator.rb:7:13: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  PATTERN = /\A[a-z0-9]+_\d+_\d+\z/.freeze
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/workers/concerns/worker_context.rb:33:25: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    BATCH_CONTEXT_KEY = "#{name}_batch_context"
                        ^^^^^^^^^^^^^^^^^^^^^^^
danger/architecture/Dangerfile:13:26: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
BLUEPRINT_LONG_MESSAGE = <<~MSG
                         ^^^^^^
danger/database/Dangerfile:5:35: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
SCHEMA_NOT_UPDATED_MESSAGE_FULL = <<~MSG
                                  ^^^^^^
danger/database/Dangerfile:28:21: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
DB_REMOVE_MESSAGE = <<~MSG
                    ^^^^^^
danger/feature_flag/Dangerfile:7:22: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
SUGGEST_MR_COMMENT = <<~SUGGEST_COMMENT
                     ^^^^^^^^^^^^^^^^^^
ee/app/finders/concerns/epics/findable.rb:18:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    IID_STARTS_WITH_PATTERN = %r{\A(\d)+\z}.freeze
                              ^^^^^^^^^^^^^^^^^^^^
ee/app/finders/ee/analytics/cycle_analytics/stage_finder.rb:9:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        NUMBERS_ONLY = /\A\d+\z/.freeze
                       ^^^^^^^^^^^^^^^^
ee/app/finders/epics_finder.rb:38:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  IID_STARTS_WITH_PATTERN = %r{\A(\d)+\z}.freeze
                            ^^^^^^^^^^^^^^^^^^^^
ee/app/graphql/mutations/incident_management/oncall_rotation/base.rb:8:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        TIME_FORMAT = /^(0\d|1\d|2[0-3]):[0-5]\d$/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/graphql/types/incident_management/oncall_rotation_date_input_type.rb:17:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DATE_FORMAT = %r[^\d{4}-[0123]\d-\d{2}$].freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/graphql/types/incident_management/oncall_rotation_date_input_type.rb:18:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      TIME_FORMAT = %r[^(0\d|1\d|2[0-3]):[0-5]\d$].freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/models/allowed_email_domain.rb:30:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  VALID_DOMAIN_REGEX = /\A#{VALID_DOMAIN_BASE}\z/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/models/allowed_email_domain.rb:33:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  JS_VALID_DOMAIN_REGEX = /^#{VALID_DOMAIN_BASE}$/.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/models/ee/issue.rb:9:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      WEIGHT_RANGE = (0..20).freeze
                     ^^^^^^^^^^^^^^
ee/app/models/ee/iteration.rb:126:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @reference_pattern ||= %r{ ...
                               ^^^
ee/app/models/ee/label.rb:8:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    SCOPED_LABEL_PATTERN = /^.*#{SCOPED_LABEL_SEPARATOR}/.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/models/ee/project_import_state.rb:11:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SSL_CERTIFICATE_PROBLEM = /SSL certificate problem/.freeze
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/models/ee/vulnerability.rb:25:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      REGEX_CAPTURING_STATUS = /\A[\w+\s]+to\s(?<status>\w+)/.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/models/status_page/project_setting.rb:6:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    AWS_BUCKET_NAME_REGEXP = /\A[a-z0-9][a-z0-9\-.]*\z/.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/models/status_page/project_setting.rb:7:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    AWS_ACCESS_KEY_REGEXP  = /\A[A-Z0-9]{20}\z/.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/models/status_page/project_setting.rb:8:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    AWS_SECRET_KEY_REGEXP  = %r{\A[A-Za-z0-9/+=]{40}\z}.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/serializers/analytics/cycle_analytics/value_stream_errors_serializer.rb:21:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      STAGE_ATTRIBUTE_REGEX = /stages\[(\d+)\]\.(.+)/.freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/services/elastic/data_migration_service.rb:6:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    MIGRATION_REGEXP = /\A([0-9]+)_([_a-z0-9]*)\.rb\z/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/services/elastic/indexing_control_service.rb:9:27: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    PROJECT_CONTEXT_KEY = "#{Gitlab::ApplicationContext::LOG_KEY}.project"
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/services/incident_management/issuable_resource_links/create_service.rb:6:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      ZOOM_REGEXP = %r{https://(?:[\w-]+\.)?zoom\.us/(?:s|j|my)/\S+}.freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/services/incident_management/issuable_resource_links/create_service.rb:7:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SLACK_REGEXP = %r{https://[a-zA-Z0-9]+.slack\.com/[a-z][a-zA-Z0-9_]+}.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/services/projects/restore_service.rb:7:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    DELETED_SUFFIX_REGEX = /-deleted-[a-zA-Z0-9]+\z/.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/app/services/security/ingestion/tasks/ingest_vulnerability_statistics.rb:16:31: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        UPSERT_SQL_TEMPLATE = <<~SQL
                              ^^^^^^
ee/app/services/vulnerabilities/statistics/adjustment_service.rb:25:19: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      STATS_SQL = <<~SQL
                  ^^^^^^
ee/app/services/vulnerabilities/statistics/update_service.rb:6:26: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      LETTER_GRADE_SQL = <<~SQL
                         ^^^^^^
ee/app/services/vulnerabilities/statistics/update_service.rb:21:20: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      UPSERT_SQL = <<~SQL
                   ^^^^^^
ee/lib/ee/gitlab/path_regex.rb:10:36: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          @saml_callback_regex ||= %r(\A\/groups\/(?<group>#{full_namespace_route_regex})\/\-\/saml\/callback\z).freeze
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/lib/ee/gitlab/web_hooks/rate_limiter.rb:13:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        PREMIUM_MID_RANGE = (100..399).freeze
                            ^^^^^^^^^^^^^^^^^
ee/lib/ee/gitlab/web_hooks/rate_limiter.rb:14:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        ULTIMATE_MID_RANGE = (1_000..4_999).freeze
                             ^^^^^^^^^^^^^^^^^^^^^
ee/lib/elastic/latest/git_class_proxy.rb:6:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SHA_REGEX = /\A[0-9a-f]{5,40}\z/i.freeze
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/lib/gitlab/code_owners/file.rb:8:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SECTION_HEADER_REGEX = /^(\^)?\[(.*?)\](?:\[(\d*?)\])?/.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/lib/gitlab/code_owners/reference_extractor.rb:11:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      EMAIL_REGEXP = /(?<email>([^@\s]+@[^@\s]+(?<!\W)))/.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/lib/gitlab/status_page/filter/image_filter.rb:10:47: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        NON_GREEDY_UPLOAD_FILE_PATH_PATTERN = %r{/uploads/(?<secret>[0-9a-f]{32})/(?<file>.*)}.freeze
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ee/lib/system_check/geo/authorized_keys_check.rb:11:44: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      OPENSSH_AUTHORIZED_KEYS_CMD_REGEXP = %r{ ...
                                           ^^^
ee/lib/system_check/geo/authorized_keys_check.rb:20:45: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      OPENSSH_AUTHORIZED_KEYS_USER_REGEXP = %r{ ...
                                            ^^^
haml_lint/linter/documentation_links.rb:20:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      MARKDOWN_HEADER = %r{\A\#{1,6}\s+(?<header>.+)\Z}.freeze
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/api/api.rb:10:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    NO_SLASH_URL_PART_REGEX = %r{[^/]+}.freeze
                              ^^^^^^^^^^^^^^^^
lib/api/concerns/packages/nuget_endpoints.rb:17:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        POSITIVE_INTEGER_REGEX = %r{\A[1-9]\d*\z}.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^
lib/api/concerns/packages/nuget_endpoints.rb:18:38: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        NON_NEGATIVE_INTEGER_REGEX = %r{\A(0|[1-9]\d*)\z}.freeze
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/api/debian_group_packages.rb:6:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      project_id: %r{[0-9]+}.freeze
                  ^^^^^^^^^^^^^^^^^
lib/api/go_proxy.rb:13:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    MODULE_VERSION_REGEX = /v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([-.!a-z0-9]+))?(?:\+([-.!a-z0-9]+))?/.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/api/helpers.rb:21:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    INTEGER_ID_REGEX = /^-?\d+$/.freeze
                       ^^^^^^^^^^^^^^^^
lib/api/v3/github.rb:11:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      NO_SLASH_URL_PART_REGEX = %r{[^/]+}.freeze
                                ^^^^^^^^^^^^^^^^
lib/api/validations/validators/git_ref.rb:13:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        GIT_REF_LENGTH = (1..1024).freeze
                         ^^^^^^^^^^^^^^^^
lib/atlassian/jira_connect/jwt/asymmetric.rb:17:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        UUID4_REGEX = /\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/color_parser.rb:5:13: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    ALPHA = /0(?:\.\d+)?|\.\d+|1(?:\.0+)?/.freeze # 0.0..1.0
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/color_parser.rb:6:16: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    PERCENTS = /(?:\d{1,2}|100)%/.freeze # 00%..100%
               ^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/color_parser.rb:7:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    ALPHA_CHANNEL = /(?:,\s*(?:#{ALPHA}|#{PERCENTS}))?/.freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/color_parser.rb:8:12: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    BITS = /\d{1,2}|1\d\d|2(?:[0-4]\d|5[0-5])/.freeze # 00..255
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/color_parser.rb:9:12: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    DEGS = /-?\d+(?:deg)?/i.freeze # [-]digits[deg]
           ^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/color_parser.rb:10:12: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    RADS = /-?(?:\d+(?:\.\d+)?|\.\d+)rad/i.freeze # [-](digits[.digits] OR .digits)rad
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/color_parser.rb:11:18: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    HEX_FORMAT = /\#(?:\h{3}|\h{4}|\h{6}|\h{8})/.freeze
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/color_parser.rb:12:18: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    RGB_FORMAT = %r{ ...
                 ^^^
lib/banzai/color_parser.rb:24:18: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    HSL_FORMAT = %r{ ...
                 ^^^
lib/banzai/color_parser.rb:35:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    COLOR_FORMAT = /\A(#{Regexp.union(FORMATS)})\z/ix.freeze
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/ascii_doc_sanitization_filter.rb:10:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PREFIXED_ID_PATTERN = /\A#{Gitlab::Asciidoc::DEFAULT_ADOC_ATTRS['idprefix']}(:?[[:alnum:]]|-|_)+\z/.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/attributes_filter.rb:19:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      ATTRIBUTES_PATTERN = %r{\A(?<matched>\{(?<attributes>.{1,100})\})}.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/attributes_filter.rb:20:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      WIDTH_HEIGHT_REGEX = %r{\A(?<name>height|width)="?(?<size>[\w%]{1,10})"?\z}.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/attributes_filter.rb:21:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      VALID_SIZE_REGEX   = %r{\A\d{1,4}(%|px)?\z}.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/autolink_filter.rb:37:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      LINK_PATTERN = %r{([a-z][a-z0-9\+\.-]+://[^\s>]+)(?<!\?|!|\.|,|:)}.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/autolink_filter.rb:43:20: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      TEXT_QUERY = %Q(descendant-or-self::text()[ ...
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/blockquote_fence_filter.rb:6:15: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      REGEX = %r{ ...
              ^^^
lib/banzai/filter/dollar_math_post_filter.rb:20:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DOLLAR_INLINE_PATTERN = %r{ ...
                              ^^^
lib/banzai/filter/dollar_math_post_filter.rb:25:39: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DOLLAR_DISPLAY_INLINE_PATTERN = %r{ ...
                                      ^^^
lib/banzai/filter/dollar_math_pre_filter.rb:20:15: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      REGEX = %r{ ...
              ^^^
lib/banzai/filter/footnote_filter.rb:22:41: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      FOOTNOTE_LI_REFERENCE_PATTERN   = /\A#{FOOTNOTE_ID_PREFIX}.+\z/.freeze
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/footnote_filter.rb:23:41: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      FOOTNOTE_LINK_REFERENCE_PATTERN = /\A#{FOOTNOTE_LINK_ID_PREFIX}.+\z/.freeze
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/gollum_tags_filter.rb:54:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      TAGS_PATTERN = /\[\[(.+?)\]\]/.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/gollum_tags_filter.rb:57:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      ALLOWED_IMAGE_EXTENSIONS = /.+(jpg|png|gif|svg|bmp)\z/i.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/markdown_post_escape_filter.rb:8:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      LITERAL_REGEX     = %r{#{LITERAL_KEYWORD}-(.*?)-#{LITERAL_KEYWORD}}.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/markdown_post_escape_filter.rb:9:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      NOT_LITERAL_REGEX = %r{#{LITERAL_KEYWORD}-((%5C|\\).+?)-#{LITERAL_KEYWORD}}.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/markdown_post_escape_filter.rb:10:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SPAN_REGEX        = %r{<span>(.*?)</span>}.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/markdown_pre_escape_filter.rb:60:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      ASCII_PUNCTUATION    = %r{(\\[#{TARGET_CHARS}])}.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/math_filter.rb:27:22: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      MATH_CLASSES = "code math #{TAG_CLASS}"
                     ^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/references/abstract_reference_filter.rb:22:33: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        REFERENCE_PLACEHOLDER = "_reference_#{SecureRandom.hex(16)}_"
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/references/abstract_reference_filter.rb:23:41: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        REFERENCE_PLACEHOLDER_PATTERN = %r{#{REFERENCE_PLACEHOLDER}(\d+)}.freeze
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/sanitization_filter.rb:10:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      TABLE_ALIGNMENT_PATTERN = /text-align: (?<alignment>center|left|right)/.freeze
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/spaced_link_filter.rb:45:20: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      TEXT_QUERY = %Q(descendant-or-self::text()[ ...
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/banzai/filter/task_list_filter.rb:35:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      INAPPLICABLEPATTERN = /\[~\]/.freeze
                            ^^^^^^^^^^^^^^
lib/banzai/filter/task_list_filter.rb:39:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      NEWITEMPATTERN = / ...
                       ^
lib/bulk_imports/common/pipelines/uploads_pipeline.rb:9:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        AVATAR_PATTERN = %r{.*\/#{BulkImports::UploadsExportService::AVATAR_PATH}\/(?<identifier>.*)}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/bulk_imports/file_downloads/filename_fetch.rb:6:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      REMOTE_FILENAME_PATTERN = %r{filename="(?<filename>[^"]+)"}.freeze
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/csv_builder.rb:19:18: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  PREFIX_REGEX = /\A[=\+\-@;]/.freeze
                 ^^^^^^^^^^^^^^^^^^^^
lib/error_tracking/sentry_client/pagination_parser.rb:6:17: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PATTERN = /rel="(?<direction>\w+)";\sresults="(?<results>\w+)";\scursor="(?<cursor>.+)"/.freeze
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/expand_variables.rb:4:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  VARIABLES_REGEXP = /\$([a-zA-Z_][a-zA-Z0-9_]*)|\${\g<1>}|%\g<1>%/.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/feature/definition.rb:10:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    VALID_FEATURE_NAME = %r{^#{Gitlab::Regex.sep_by_1('_', /[a-z0-9]+/)}$}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitaly/server.rb:5:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    SHA_VERSION_REGEX = /\A\d+\.\d+\.\d+-\d+-g([a-f0-9]{8})\z/.freeze
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification.rb:13:11: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          /\Acloud\.drone\.io\z/i.freeze
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/background_migration/backfill_integrations_enable_ssl_verification.rb:20:11: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          /\A[^\.]+\.teamcity\.com\z/i.freeze
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/background_migration/recalculate_vulnerabilities_occurrences_uuid.rb:64:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    NAMESPACE_REGEX = /(\h{8})-(\h{4})-(\h{4})-(\h{4})-(\h{4})(\h{8})/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/background_migration/update_jira_tracker_data_deployment_type_based_on_url.rb:23:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      JIRA_CLOUD_REGEX = %r{^https?://[A-Za-z0-9](?:[A-Za-z0-9\-]{0,61}[A-Za-z0-9])?\.atlassian\.net$}ix.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/changelog/generator.rb:9:9: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        /^##\s+(?<version>#{Gitlab::Regex.unbounded_semver_regex})/.freeze
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/build/artifacts/metadata.rb:14:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          VERSION_PATTERN = /^[\w\s]+(\d+\.\d+\.\d+)/.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/build/artifacts/metadata.rb:15:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          INVALID_PATH_PATTERN = %r{(^\.?\.?/)|(/\.?\.?/)}.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/artifacts.rb:17:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          EXPOSE_AS_REGEX = /\A\w[-\w ]*\z/.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/external/file/base.rb:13:40: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            YAML_WHITELIST_EXTENSION = /.+\.(yml|yaml)$/i.freeze
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/interpolation/block.rb:8:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        PATTERN = /(?<block>\$\[\[\s*(?<access>.*?)\s*\]\])/.freeze
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/parsers/test/junit.rb:9:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          ATTACHMENT_TAG_REGEX = /\[\[ATTACHMENT\|(?<path>.+?)\]\]/.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/chain/skip.rb:10:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          SKIP_PATTERN = /\[(ci[ _-]skip|skip[ _-]ci)\]/i.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/and.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /&&/.freeze
                      ^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/equals.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /==/.freeze
                      ^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/matches.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /=~/.freeze
                      ^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/not_equals.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /!=/.freeze
                      ^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/not_matches.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /\!~/.freeze
                      ^^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/null.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /null/.freeze
                      ^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/or.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /\|\|/.freeze
                      ^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/parenthesis_close.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /\)/.freeze
                      ^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/parenthesis_open.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /\(/.freeze
                      ^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/pattern.rb:11:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = %r{^\/([^\/]|\\/)+[^\\]\/[ismU]*}.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/string.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /("(?<string>.*?)")|('(?<string>.*?)')/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/variable.rb:9:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
            PATTERN = /\$(?<name>\w+)/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/trace/section_parser.rb:77:43: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          @beginning_of_section_regex ||= /section_/.freeze
                                          ^^^^^^^^^^^^^^^^^
lib/gitlab/ci/variables/collection/item.rb:10:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          VARIABLES_REGEXP = /\$\$|%%|\$(?<key>[a-zA-Z_][a-zA-Z0-9_]*)|\${\g<key>?}|%\g<key>%/.freeze.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/cleanup/project_upload_file_finder.rb:8:38: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      EXCLUDED_SYSTEM_UPLOADS_PATH = "#{ABSOLUTE_UPLOAD_DIR}/-/*"
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/cleanup/project_upload_file_finder.rb:9:38: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      EXCLUDED_HASHED_UPLOADS_PATH = "#{ABSOLUTE_UPLOAD_DIR}/@hashed/*"
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/cleanup/project_upload_file_finder.rb:10:35: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      EXCLUDED_TMP_UPLOADS_PATH = "#{ABSOLUTE_UPLOAD_DIR}/tmp/*"
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/cleanup/project_uploads.rb:96:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        PROJECT_FULL_PATH_REGEX = %r{\A#{FileUploader.root}/(.+)/(\h+/[^/]+)\z}.freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/color.rb:5:15: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    PATTERN = /\A\#(?:[0-9A-Fa-f]{3}){1,2}\Z/.freeze
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/config/loader/multi_doc_yaml.rb:11:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        MULTI_DOC_DIVIDER = /^---$/.freeze
                            ^^^^^^^^^^^^^^
lib/gitlab/counters/buffered_counter.rb:45:49: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      LUA_INCREMENT_WITH_DEDUPLICATION_SCRIPT = <<~LUA
                                                ^^^^^^
lib/gitlab/counters/buffered_counter.rb:111:37: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      LUA_INITIATE_REFRESH_SCRIPT = <<~LUA
                                    ^^^^^^
lib/gitlab/database/background_migration/batched_migration.rb:8:30: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        BATCH_CLASS_MODULE = "#{JOB_CLASS_MODULE}::BatchingStrategies"
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/database/background_migration/batch_optimizer.rb:20:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        TARGET_EFFICIENCY = (0.9..0.95).freeze
                            ^^^^^^^^^^^^^^^^^^
lib/gitlab/database/load_balancing/service_discovery.rb:25:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        RETRY_DELAY_RANGE = (0.1..0.2).freeze
                            ^^^^^^^^^^^^^^^^^
lib/gitlab/database/migrations/runner.rb:10:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        POST_MIGRATION_MATCHER = %r{db/post_migrate/}.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/database/partitioning_migration_helpers/table_management_helpers.rb:13:32: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MIGRATION_CLASS_NAME = "::#{module_parent_name}::BackfillPartitionedTable"
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/database/postgres_constraint.rb:7:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      IDENTIFIER_REGEX = /^\w+\.\w+$/.freeze
                         ^^^^^^^^^^^^^^^^^^^
lib/gitlab/database/postgres_hll/batch_distinct_counter.rb:42:23: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        BIT_31_MASK = "B'0#{'1' * 31}'"
                      ^^^^^^^^^^^^^^^^^
lib/gitlab/database/postgres_hll/batch_distinct_counter.rb:43:44: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        BIT_32_NORMALIZED_BUCKET_ID_MASK = "B'#{'0' * (32 - BUCKET_ID_MASK.size)}#{BUCKET_ID_MASK}'"
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/database/query_analyzers/query_recorder.rb:8:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        LIST_PARAMETER_REGEX = %r{\$\d+(?:\s*,\s*\$\d+)+}.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/database/query_analyzers/query_recorder.rb:9:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        SINGLE_PARAMETER_REGEX = %r{\$\d+}.freeze
                                 ^^^^^^^^^^^^^^^^
lib/gitlab/database/similarity_score.rb:13:50: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      SIMILARITY_FUNCTION_CALL_WITH_ANNOTATION = "/* #{DISPLAY_NAME} */ SIMILARITY"
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/dependency_linker/base_linker.rb:6:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      URL_REGEX = %r{https?://[^'" ]+}.freeze
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/dependency_linker/base_linker.rb:7:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      GIT_INVALID_URL_REGEX = /^git\+#{URL_REGEX}/.freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/dependency_linker/base_linker.rb:8:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      REPO_REGEX = %r{[^/'" ]+/[^/'" ]+}.freeze
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/dependency_linker/gemfile_linker.rb:11:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      GITHUB_REGEX = /(github:|:github\s*=>)\s*['"](?<name>[^'"]+)['"]/.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/dependency_linker/gemfile_linker.rb:12:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      GIT_REGEX = /(git:|:git\s*=>)\s*['"](?<name>#{URL_REGEX})['"]/.freeze
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/dependency_linker/godeps_json_linker.rb:6:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      NESTED_REPO_REGEX = %r{([^/]+/)+[^/]+?}.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/dependency_linker/podspec_linker.rb:8:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      STRING_REGEX = /['"](?<name>[^'"]+)['"]/.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/diff/highlight.rb:6:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PREFIX_REGEXP = /\A(.)/.freeze
                      ^^^^^^^^^^^^^^
lib/gitlab/diff/pair_selector.rb:10:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      LINE_PAIRS_PATTERN = %r{ ...
                           ^^^
lib/gitlab/diff/suggestions_parser.rb:7:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SUGGESTION_CONTEXT = /^(\-(?<above>\d+))?(\+(?<below>\d+))?$/.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/handler/base_handler.rb:9:39: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        HANDLER_ACTION_BASE_REGEX ||= /(?<project_slug>.+)-(?<project_id>\d+)/.freeze
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/handler/create_issue_handler.rb:14:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        HANDLER_REGEX        = /\A#{HANDLER_ACTION_BASE_REGEX}-(?<incoming_email_token>.+)-issue\z/.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/handler/create_issue_handler.rb:15:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        HANDLER_REGEX_LEGACY = /\A(?<project_path>[^\+]*)\+(?<incoming_email_token>.*)\z/.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/handler/create_merge_request_handler.rb:15:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        HANDLER_REGEX        = /\A#{HANDLER_ACTION_BASE_REGEX}-(?<incoming_email_token>.+)-merge-request\z/.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/handler/create_merge_request_handler.rb:16:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        HANDLER_REGEX_LEGACY = /\A(?<project_path>[^\+]*)\+merge-request\+(?<incoming_email_token>.*)/.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/handler/create_note_on_issuable_handler.rb:18:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        HANDLER_REGEX = /\A#{HANDLER_ACTION_BASE_REGEX}-(?<incoming_email_token>.+)-issue-(?<issuable_iid>\d+)\z/.freeze
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/handler/service_desk_handler.rb:13:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        HANDLER_REGEX        = /\A#{HANDLER_ACTION_BASE_REGEX}-issue-\z/.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/handler/service_desk_handler.rb:14:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        HANDLER_REGEX_LEGACY = /\A(?<project_path>[^\+]*)\z/.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/handler/service_desk_handler.rb:15:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        PROJECT_KEY_PATTERN  = /\A(?<slug>.+)-(?<key>[a-z0-9_]+)\z/.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/hook/validate_addresses_interceptor.rb:10:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        UNSAFE_CHARACTERS = /(\\|[^[:print:]])/.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/email/receiver.rb:11:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      RECEIVED_HEADER_REGEX = /for\s+\<(.+)\>/.freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/error_tracking/error_repository/open_api_strategy.rb:178:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        LINK_PATTERN = %r{cursor=(?<cursor>[^&]+).*; rel="(?<direction>\w+)"}.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/etag_caching/router/rails.rb:20:33: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        RESERVED_WORDS_PREFIX = %Q(^(?!.*\/(#{RESERVED_WORDS_REGEX})\/).*)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/front_matter.rb:13:15: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    PATTERN = %r{ ...
              ^^^
lib/gitlab/git/base_error.rb:7:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DEBUG_ERROR_STRING_REGEX = /(.*?) debug_error_string:.*$/m.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/git/diff.rb:36:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      BINARY_NOTICE_PATTERN = %r(Binary files a\/(.*) and b\/(.*) differ).freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/github_import/representation/diff_note.rb:10:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        NOTEABLE_ID_REGEX = %r{/pull/(?<iid>\d+)}i.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/github_import/representation/diff_notes/discussion_id.rb:9:36: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          DISCUSSION_CACHE_REGEX = %r{/(?<repo>[^/]*)/pull/(?<iid>\d+)}i.freeze
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/github_import/representation/diff_notes/suggestion_formatter.rb:19:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          GITHUB_SUGGESTION = /^\ {,3}(?<suggestion>```suggestion\b).*(?<eol>\R)/.freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/github_import/representation/note.rb:15:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        NOTEABLE_TYPE_REGEX = %r{/(?<type>(pull|issues))/(?<iid>\d+)}i.freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/git/lfs_pointer_file.rb:7:22: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      VERSION_LINE = "version #{VERSION}"
                     ^^^^^^^^^^^^^^^^^^^^
lib/gitlab/git/pre_receive_error.rb:17:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SAFE_MESSAGE_REGEX = /^(#{SAFE_MESSAGE_PREFIXES.join('|')})\s*(?<safe_message>.+)/.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/git.rb:11:17: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    COMMIT_ID = /\A[0-9a-f]{40}\z/.freeze
                ^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/golang.rb:35:13: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        m = /\A(.*\.)?0\./.freeze.match pre
            ^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/golang.rb:43:7: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      /\A\d{14}-\h+\z/.freeze.match? pre
      ^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/graphql/queries.rb:8:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      IMPORT_RE = /^#\s*import "(?<path>[^"]+)"$/m.freeze
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/graphql/queries.rb:9:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      EE_ELSE_CE = /^ee_else_ce/.freeze
                   ^^^^^^^^^^^^^^^^^^^^
lib/gitlab/graphql/queries.rb:10:17: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      HOME_RE = /^~/.freeze
                ^^^^^^^^^^^
lib/gitlab/graphql/queries.rb:11:17: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      HOME_EE = %r{^ee/}.freeze
                ^^^^^^^^^^^^^^^
lib/gitlab/graphql/queries.rb:12:17: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DOTS_RE = %r{^(\.\./)+}.freeze
                ^^^^^^^^^^^^^^^^^^^^
lib/gitlab/graphql/queries.rb:13:16: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DOT_RE = %r{^\./}.freeze
               ^^^^^^^^^^^^^^^
lib/gitlab/graphql/queries.rb:14:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      IMPLICIT_ROOT = %r{^app/}.freeze
                      ^^^^^^^^^^^^^^^^
lib/gitlab/graphql/queries.rb:15:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      CONN_DIRECTIVE = /@connection\(key: "\w+"\)/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/harbor/query.rb:11:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SORT_REGEX = %r{\A(creation_time|update_time|name) (asc|desc)\z}.freeze
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/hook_data/base_builder.rb:8:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      MARKDOWN_SIMPLE_IMAGE = %r{ ...
                              ^^^
lib/gitlab/i18n/po_linter.rb:12:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      VARIABLE_REGEX = /%{\w*}|%[a-z]/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/i18n/translation_entry.rb:6:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PERCENT_REGEX = /(?:^|[^%])%(?!{\w*}|[a-z%])/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/i18n/translation_entry.rb:7:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      ANGLE_BRACKET_REGEX = /[<>]/.freeze
                            ^^^^^^^^^^^^^
lib/gitlab/issues/rebalancing/state.rb:8:45: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        CONCURRENT_RUNNING_REBALANCES_KEY = "#{REDIS_KEY_PREFIX}:running_rebalances"
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/issues/rebalancing/state.rb:9:46: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        RECENTLY_FINISHED_REBALANCE_PREFIX = "#{REDIS_KEY_PREFIX}:recently_finished"
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/jira/dvcs.rb:8:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      ENCODED_ROUTE_REGEX = /[a-zA-Z0-9_\-\.#{ENCODED_SLASH}]+/.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/lfs/client.rb:10:28: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      GIT_LFS_USER_AGENT = "GitLab #{Gitlab::VERSION} LFS client"
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/merge_requests/message_generator.rb:112:37: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PLACEHOLDERS_COMBINED_REGEX = /%{(#{Regexp.union(PLACEHOLDERS.keys)})}/.freeze
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/exporter/base_exporter.rb:10:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        CERT_REGEX = /-----BEGIN CERTIFICATE-----(?:.|\n)+?-----END CERTIFICATE-----/.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/requests_rack_middleware.rb:16:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      HEALTH_ENDPOINT = %r{^/-/(liveness|readiness|health|metrics)/?$}.freeze
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/subscribers/active_record.rb:14:44: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        SQL_COMMANDS_WITH_COMMENTS_REGEX = %r{\A(/\*.*\*/\s)?((?!(.*[^\w'"](DELETE|UPDATE|INSERT INTO)[^\w'"])))(WITH.*)?(SELECT)((?!(FOR UPDATE|FOR SHARE)).)*$}i.freeze
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/subscribers/active_record.rb:23:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        SQL_WAL_LOCATION_REGEX = /(pg_current_wal_insert_lsn\(\)::text|pg_last_wal_replay_lsn\(\)::text)/.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/system.rb:19:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PRIVATE_PAGES_PATTERN = /^(Private_Clean|Private_Dirty|Private_Hugetlb):\s+(?<value>\d+)/.freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/system.rb:20:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PSS_PATTERN = /^Pss:\s+(?<value>\d+)/.freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/system.rb:21:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      RSS_TOTAL_PATTERN = /^VmRSS:\s+(?<value>\d+)/.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/system.rb:22:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      RSS_ANON_PATTERN = /^RssAnon:\s+(?<value>\d+)/.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/system.rb:23:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      RSS_FILE_PATTERN = /^RssFile:\s+(?<value>\d+)/.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/system.rb:24:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      MAX_OPEN_FILES_PATTERN = /Max open files\s*(?<value>\d+)/.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/system.rb:25:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      MEM_TOTAL_PATTERN = /^MemTotal:\s+(?<value>\d+) (.+)/.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/middleware/compressed_json.rb:7:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PACKAGES_PATH = %r{ ...
                      ^^^
lib/gitlab/middleware/compressed_json.rb:18:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      UNSAFE_CHARACTERS = %r{[!"#&'()*+,./:;<>=?@\[\]^`{}|~$]}xi.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/middleware/go.rb:11:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PROJECT_PATH_REGEX = %r{\A(#{Gitlab::PathRegex.full_namespace_route_regex}/#{Gitlab::PathRegex.project_route_regex})/}.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/middleware/read_only.rb:6:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      API_VERSIONS = (3..4).freeze
                     ^^^^^^^^^^^^^
lib/gitlab/middleware/sidekiq_web_static.rb:11:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SIDEKIQ_REGEX = %r{\A/admin/sidekiq/}.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/middleware/static.rb:6:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      UPLOADS_REGEX = %r{\A/uploads(/|\z)}.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:136:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    NO_SUFFIX_REGEX = /(?<!\.git|\.atom)/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:137:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    NAMESPACE_FORMAT_REGEX = /(?:#{NAMESPACE_FORMAT_REGEX_JS})#{NO_SUFFIX_REGEX}/.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:138:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    PROJECT_PATH_FORMAT_REGEX = /(?:#{PATH_REGEX_STR})#{NO_SUFFIX_REGEX}/.freeze
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:139:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    FULL_NAMESPACE_FORMAT_REGEX = %r{(#{NAMESPACE_FORMAT_REGEX}/){,#{Namespace::NUMBER_OF_ANCESTORS_ALLOWED}}#{NAMESPACE_FORMAT_REGEX}}.freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:179:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @repository_route_regex ||= /(#{full_namespace_route_regex}|#{personal_snippet_repository_path_regex})\.*/.freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:183:39: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @repository_git_route_regex ||= /#{repository_route_regex}\.git/.freeze
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:187:43: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @repository_git_lfs_route_regex ||= %r{#{repository_git_route_regex}\/(info\/lfs|gitlab-lfs)\/}.freeze
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:191:44: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @repository_wiki_git_route_regex ||= /#{full_namespace_route_regex}\.*\.wiki\.git/.freeze
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:207:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @namespace_format_regex ||= /\A#{NAMESPACE_FORMAT_REGEX}\z/o.freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:216:38: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @project_path_format_regex ||= /\A#{PROJECT_PATH_FORMAT_REGEX}\z/o.freeze
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:226:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @archive_formats_regex ||= /(zip|tar|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:257:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @container_image_regex ||= %r{([\w\.-]+\/){0,4}[\w\.-]+}.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:261:43: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @container_image_blob_sha_regex ||= %r{[\w+.-]+:?\w+}.freeze
                                          ^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/push_options.rb:39:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    OPTION_MATCHER = /(?<namespace>[^\.]+)\.(?<key>[^=]+)=?(?<value>.*)/.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/query_limiting/transaction.rb:71:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      SCHEMA_INTROSPECTION = %r/SELECT.*(FROM|JOIN) (pg_attribute|pg_class)/m.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/quick_actions/extractor.rb:12:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      CODE_REGEX = %r{ ...
                   ^^^
lib/gitlab/quick_actions/extractor.rb:25:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      INLINE_CODE_REGEX = %r{ ...
                          ^^^
lib/gitlab/quick_actions/extractor.rb:36:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      HTML_BLOCK_REGEX = %r{ ...
                         ^^^
lib/gitlab/quick_actions/extractor.rb:49:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      QUOTE_BLOCK_REGEX = %r{ ...
                          ^^^
lib/gitlab/quick_actions/extractor.rb:62:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      EXCLUSION_REGEX = %r{ ...
                        ^^^
lib/gitlab/quick_actions/spend_time_and_date_separator.rb:14:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DATE_REGEX = %r{(\d{2,4}[/\-.]\d{1,2}[/\-.]\d{1,2})}.freeze
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/quick_actions/timeline_text_and_date_time_separator.rb:6:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DATETIME_REGEX = %r{(\d{2,4}[\-.]\d{1,2}[\-.]\d{1,2} \d{1,2}:\d{2})}.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/quick_actions/timeline_text_and_date_time_separator.rb:7:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      MIXED_DELIMITER = %r{([/.])}.freeze
                        ^^^^^^^^^^^^^^^^^
lib/gitlab/quick_actions/timeline_text_and_date_time_separator.rb:8:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      TIME_REGEX = %r{(\d{1,2}:\d{2})}.freeze
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/rack_attack/request.rb:8:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      FILES_PATH_REGEX = %r{^/api/v\d+/projects/[^/]+/repository/files/.+}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/rack_attack/request.rb:9:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      GROUP_PATH_REGEX = %r{^/api/v\d+/groups/[^/]+/?$}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab.rb:47:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  APP_DIRS_PATTERN = %r{^/?(app|config|ee|lib|spec|\(\w*\))}.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/redis/hll.rb:8:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      KEY_REGEX = %r{\A(\w|-|:)*\{\w*\}(\w|-|:)*\z}.freeze
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:9:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      API_PATH_REGEX = %r{^/api/v\d+/(projects/[^/]+/|groups?/[^/]+/-/)?packages/[A-Za-z]+}.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:12:44: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @conan_package_reference_regex ||= %r{\A[A-Za-z0-9]+\z}.freeze
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:16:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @conan_revision_regex ||= %r{\A0\z}.freeze
                                  ^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:20:9: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        %r{\A(_|#{conan_name_regex})\z}.freeze
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:25:43: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @conan_recipe_component_regex ||= %r{\A#{conan_name_regex}\z}.freeze
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:30:45: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @composer_package_version_regex ||= %r{\Av?((\d++)(\.(?:\d++|[xX*]))?(\.(?:\d++|[xX*]))?(\.(?:\d++|[xX*]))?)?\z}.freeze
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:34:41: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @composer_dev_version_regex ||= %r{(^dev-)|(-dev$)}.freeze
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:39:11: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
          %r{ ...
          ^^^
lib/gitlab/regex.rb:53:36: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @maven_file_name_regex ||= %r{\A[A-Za-z0-9\.\_\-\+]+\z}.freeze
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:57:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @maven_path_regex ||= %r{\A\@?(([\w\-\.]*)/)*([\w\-\.\+]*)\z}.freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:61:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @maven_app_name_regex ||= /\A[\w\-\.]+\z/.freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:65:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @maven_version_regex ||= /\A(?!.*\.\.)[\w+.-]+\z/.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:77:39: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @nuget_package_name_regex ||= %r{\A[-+\.\_a-zA-Z0-9]+\z}.freeze
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:81:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @nuget_version_regex ||= / ...
                                 ^
lib/gitlab/regex.rb:91:50: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @terraform_module_package_name_regex ||= %r{\A[-a-z0-9]+\/[-a-z0-9]+\z}.freeze
                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:97:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @pypi_version_regex ||= %r{ ...
                                ^^^
lib/gitlab/regex.rb:115:40: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @debian_package_name_regex ||= %r{\A[a-z0-9][-+\.a-z0-9]+\z}.freeze
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:120:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @debian_version_regex ||= %r{ ...
                                  ^^^
lib/gitlab/regex.rb:132:40: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @debian_architecture_regex ||= %r{\A#{::Packages::Debian::ARCHITECTURE_REGEX}\z}o.freeze
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:136:40: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @debian_distribution_regex ||= %r{\A#{::Packages::Debian::DISTRIBUTION_REGEX}\z}io.freeze
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:140:37: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @debian_component_regex ||= %r{\A#{::Packages::Debian::COMPONENT_REGEX}\z}o.freeze
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:144:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @helm_channel_regex ||= %r{\A([a-zA-Z0-9](\.|-|_)?){1,255}(?<!\.|-|_)\z}.freeze
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:148:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @helm_package_regex ||= %r{#{helm_channel_regex}}.freeze
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:162:37: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @unbounded_semver_regex ||= / ...
                                    ^
lib/gitlab/regex.rb:174:46: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @_semver_major_minor_patch_regex ||= / ...
                                             ^
lib/gitlab/regex.rb:180:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @_semver_major_regex ||= / ...
                                 ^
lib/gitlab/regex.rb:186:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @_semver_minor_regex ||= / ...
                                 ^
lib/gitlab/regex.rb:192:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @_semver_patch_regex ||= / ...
                                 ^
lib/gitlab/regex.rb:198:45: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @_semver_prerelease_build_regex ||= / ...
                                            ^
lib/gitlab/regex.rb:214:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @go_package_regex ||= %r{ ...
                              ^^^
lib/gitlab/regex.rb:242:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @sha256_regex ||= /\A[0-9a-f]{64}\z/i.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:248:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        @conan_name_regex ||= %r{[a-zA-Z0-9_][a-zA-Z0-9_\+\.-]{1,49}}.freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:303:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @project_name_regex ||= /\A[\p{Alnum}\u{00A9}-\u{1f9ff}_][\p{Alnum}\p{Pd}\u{002B}\u{00A9}-\u{1f9ff}_\. ]*\z/.freeze
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:313:38: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @oci_repository_path_regex ||= %r{\A[a-zA-Z0-9]+([._-][a-zA-Z0-9]+)*\z}.freeze
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:321:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @group_name_regex ||= /\A#{group_name_regex_chars}\z/.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:325:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @group_name_regex_chars ||= /[\p{Alnum}\u{00A9}-\u{1f9ff}_][\p{Alnum}\p{Pd}\u{00A9}-\u{1f9ff}_()\. ]*/.freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:359:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @environment_name_regex ||= /\A[#{environment_name_regex_chars_without_slash}]([#{environment_name_regex_chars}]*[#{environment_name_regex_chars_without_slash}])?\z/.freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:371:36: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @environment_scope_regex ||= /\A[#{environment_scope_regex_chars}]+\z/.freeze
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:403:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @environment_slug_regex ||= /\A[a-z]([a-z0-9-]*[a-z0-9])?\z/.freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:427:39: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @build_trace_section_regexp ||= %r{ ...
                                      ^^^
lib/gitlab/regex.rb:499:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @utc_date_regex ||= /\A[0-9]{4}-[0-9]{2}-[0-9]{2}\z/.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:515:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @base64_regex ||= %r{(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?}.freeze
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:533:46: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      @x509_subject_key_identifier_regex ||= /\A(?:\h{2}:)*\h{2}\z/.freeze
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/robots_txt/parser.rb:6:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DISALLOW_REGEX = /^disallow: /i.freeze
                       ^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/robots_txt/parser.rb:7:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      ALLOW_REGEX = /^allow: /i.freeze
                    ^^^^^^^^^^^^^^^^^^
lib/gitlab/saas.rb:21:7: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      %r{\Ahttps://[a-z0-9-]+\.gitlab\.com\z}.freeze
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/sanitizers/exception_message.rb:8:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      MESSAGE_REGEX = %r{(\A[^:]+:\s).*\Z}.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/sanitizers/svg.rb:12:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        DATA_ATTR_PATTERN = /\Adata-(?!xml)[a-z_][\w.\u00E0-\u00F6\u00F8-\u017F\u01DD-\u02AF-]*\z/u.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/search/abuse_detection.rb:10:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      ALLOWED_CHARS_REGEX = %r{\A[[:alnum:]_\-\/\.!]+\z}.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/search/found_blob.rb:14:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PATH_REGEXP = /\A(?<ref>[^:]*):(?<path>[^\x00]*)\x00/.freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/search/found_blob.rb:15:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      CONTENT_REGEXP = /^(?<ref>[^:]*):(?<path>[^\x00]*)\x00(?<startline>\d+)\x00/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/search/query.rb:8:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      QUOTES_REGEXP = %r{\A"|"\Z}.freeze
                      ^^^^^^^^^^^^^^^^^^
lib/gitlab/search/query.rb:9:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      TOKEN_WITH_QUOTES_REGEXP = %r{\s(?=(?:[^"]|"[^"]*")*$)}.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/search_results.rb:6:27: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    COUNT_LIMIT_MESSAGE = "#{COUNT_LIMIT - 1}+"
                          ^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/seeder.rb:8:33: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    MASS_INSERT_PROJECT_START = "#{MASS_INSERT_PREFIX}_project_"
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/seeder.rb:9:31: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    MASS_INSERT_GROUP_START = "#{MASS_INSERT_PREFIX}_group_"
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/seeder.rb:10:30: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    MASS_INSERT_USER_START = "#{MASS_INSERT_PREFIX}_user_"
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/sidekiq_config/worker_matcher.rb:10:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      QUERY_TERM_REGEX = %r{^(\w+)(!?=)([\w:#{QUERY_CONCATENATE_OPERATOR}]+)}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/sidekiq_signals.rb:12:7: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      "Intercepting signal handlers: #{REPLACE_SIGNALS.join(", ")} failed. " \ ...
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/slash_commands/deploy.rb:6:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DEPLOY_REGEX = /\Adeploy\s/.freeze
                     ^^^^^^^^^^^^^^^^^^^
lib/gitlab/slug/path.rb:6:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      LEADING_DASHES = /\A-+/.freeze
                       ^^^^^^^^^^^^^
lib/gitlab/slug/path.rb:8:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      EXTRACT_LOCAL_EMAIL_PART = /@.*\z/.freeze
                                 ^^^^^^^^^^^^^^
lib/gitlab/slug/path.rb:9:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      FORBIDDEN_CHARACTERS = /[^a-zA-Z0-9_\-.]/.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/spamcheck/client.rb:24:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      URL_SCHEME_REGEX = %r{^grpc://|^tls://}.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/sql/pattern.rb:9:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      REGEX_QUOTED_TERM = /(?<=\A| )"[^"]+"(?= |\z)/.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/unicode.rb:10:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    BIDI_REGEXP = /\p{Bidi Control}/.freeze
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/untrusted_regexp/ruby_syntax.rb:9:17: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PATTERN = %r{^/(?<regexp>.*)/(?<flags>[ismU]*)$}.freeze
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/usage_data_counters/gitlab_cli_activity_unique_counter.rb:7:37: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      GITLAB_CLI_USER_AGENT_REGEX = /GitLab\sCLI$/.freeze
                                    ^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/usage_data_counters/jetbrains_plugin_activity_unique_counter.rb:7:36: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      JETBRAINS_USER_AGENT_REGEX = /\Agitlab-jetbrains-plugin/.freeze
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/usage_data_counters/vscode_extension_activity_unique_counter.rb:7:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      VS_CODE_USER_AGENT_REGEX = /\Avs-code-gitlab-workflow/.freeze
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/utils/link_header_parser.rb:22:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      REL_PATTERN = %r{rel="(\w+)"}.freeze
                    ^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/utils/link_header_parser.rb:24:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      URI_PATTERN = %r{<(.{1,500})>}.freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/utils/markdown.rb:6:28: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PUNCTUATION_REGEXP = /[^\p{Word}\- ]/u.freeze
                           ^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/utils/markdown.rb:7:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PRODUCT_SUFFIX = /\s*\**\((core|starter|premium|ultimate|free|bronze|silver|gold)(\s+(only|self|sass))?\)\**/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/uuid.rb:12:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    UUID_V5_PATTERN = /\h{8}-\h{4}-5\h{3}-\h{4}-\h{12}/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/uuid.rb:13:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    NAMESPACE_REGEX = /(\h{8})-(\h{4})-(\h{4})-(\h{4})-(\h{4})(\h{8})/.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/version_info.rb:9:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    VERSION_REGEX = /(\d+)\.(\d+)\.(\d+)/.freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/web_hooks/recursion_detection/uuid.rb:7:18: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        HEADER = "#{::Gitlab::WebHooks::GITLAB_EVENT_HEADER}-UUID"
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/x509/certificate.rb:6:20: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      CERT_REGEX = /-----BEGIN CERTIFICATE-----(?:.|\n)+?-----END CERTIFICATE-----/.freeze
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/zoom_link_extractor.rb:11:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    ZOOM_REGEXP = %r{https://(?:[\w-]+\.)?zoom\.us/(?:s|j|my)/\S+}.freeze
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/sbom/package_url/argument_validator.rb:6:30: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      QUALIFIER_KEY_REGEXP = /^[A-Za-z\d._-]+$/.freeze
                             ^^^^^^^^^^^^^^^^^^^^^^^^^
lib/sbom/package_url/argument_validator.rb:7:34: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      START_WITH_NUMBER_REGEXP = /^\d/.freeze
                                 ^^^^^^^^^^^^
lib/tasks/gitlab/backup.rake:8:16: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    PID_FILE = "#{Rails.application.root}/tmp/backup_restore.pid"
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/tasks/gitlab/db/decomposition/rollback/bump_ci_sequences.rake:7:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        SEQUENCE_NAME_MATCHER = /nextval\('([a-z_]+)'::regclass\)/.freeze
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
qa/qa/support/parallel_pipeline_jobs.rb:10:35: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PARALLEL_JOB_NAME_PATTERN = %r{^\S+ \d+/\d+$}.freeze
                                  ^^^^^^^^^^^^^^^^^^^^^^^^
qa/qa/tools/ci/qa_changes.rb:12:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        QA_PATTERN = %r{^qa/}.freeze
                     ^^^^^^^^^^^^^^^
qa/qa/tools/ci/qa_changes.rb:13:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        SPEC_PATTERN = %r{^qa/qa/specs/features/\S+_spec\.rb}.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/background_migration/feature_category.rb:19:40: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        INVALID_FEATURE_CATEGORY_MSG = "'feature_category' is invalid. " \ ...
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/filename_length.rb:10:26: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      MSG_FILEPATH_LEN = "This file path is too long. It should be #{FILEPATH_MAX_BYTES} or less"
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/filename_length.rb:11:26: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      MSG_FILENAME_LEN = "This file name is too long. It should be #{FILENAME_MAX_BYTES} or less"
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/gitlab/doc_url.rb:24:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        DOCS_URL_REGEXP = %r{https://docs.gitlab.com/ee/[\w#%./-]+}.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/gitlab/event_store_subscriber.rb:35:35: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        FORBID_PERFORM_OVERRIDE = "Do not override `perform` in a `#{SUBSCRIBER_MODULE_NAME}`."
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/gitlab/event_store_subscriber.rb:36:32: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        REQUIRE_HANDLE_EVENT = "A `#{SUBSCRIBER_MODULE_NAME}` must implement `#handle_event(event)`."
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/gitlab/finder_with_find_by.rb:9:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        FIND_PATTERN = /\Afind(_by!?)?\z/.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/graphql/descriptions.rb:54:30: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MSG_NO_DESCRIPTION = "Please add a `description` property. #{MSG_STYLE_GUIDE_LINK}"
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/graphql/descriptions.rb:55:25: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MSG_NO_PERIOD = "`description` strings must end with a `.`. #{MSG_STYLE_GUIDE_LINK}"
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/graphql/descriptions.rb:56:25: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MSG_BAD_START = "`description` strings should not start with \"A...\" or \"The...\". #{MSG_STYLE_GUIDE_LINK}"
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/graphql/descriptions.rb:57:29: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MSG_CONTAINS_THIS = "`description` strings should not contain the demonstrative \"this\"."\ ...
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/graphql/enum_names.rb:37:33: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        CLASS_NAME_SUFFIX_MSG = "Enum class names must end with `Enum`. #{SEE_SG_MSG}"
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/graphql/enum_names.rb:38:36: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        GRAPHQL_NAME_MISSING_MSG = "A `graphql_name` must be defined for a GraphQL enum. #{SEE_SG_MSG}"
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/graphql/enum_names.rb:39:38: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        GRAPHQL_NAME_WITH_ENUM_MSG = "The `graphql_name` must not contain the string \"Enum\". #{SEE_SG_MSG}"
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/inject_enterprise_edition_module.rb:23:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      COMMENT_OR_EMPTY_LINE = /^\s*(#.*|$)/.freeze
                              ^^^^^^^^^^^^^^^^^^^^
rubocop/cop/migration/prevent_index_creation.rb:13:15: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MSG = "Adding new index to #{FORBIDDEN_TABLES.join(", ")} is forbidden, see https://gitlab.com/gitlab-org/gitlab/-/issues/332886"
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/migration/versioned_migration_class.rb:14:23: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MSG_INHERIT = "Don't inherit from ActiveRecord::Migration or old versions of Gitlab::Database::Migration. " \ ...
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/migration/versioned_migration_class.rb:17:23: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MSG_INCLUDE = "Don't include migration helper modules directly. " \ ...
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/migration/with_lock_retries_disallowed_method.rb:34:15: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MSG = "The method is not allowed to be called within the `with_lock_retries` block, the only allowed methods are: #{ALLOWED_MIGRATION_METHODS.join(', ')}"
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/project_path_helper.rb:12:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      METHOD_NAME_PATTERN = /\A([a-z_]+_)?namespace_project(?:_[a-z_]+)?_(?:url|path)\z/.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/qa/selector_usage.rb:23:21: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
        SELECTORS = /\.qa-\w+|data-qa-\w+/.freeze
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
rubocop/cop/scalability/idempotent_worker.rb:31:15: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MSG = <<~MSG
              ^^^^^^
rubocop/cop/sidekiq_load_balancing/worker_data_consistency.rb:31:15: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
        MSG = <<~MSG
              ^^^^^^
scripts/lib/glfm/constants.rb:18:29: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    GHFM_SPEC_MD_FILENAME = "ghfm_spec_v_#{GHFM_SPEC_VERSION}.md"
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
scripts/lib/glfm/constants.rb:33:28: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    GLFM_SPEC_TXT_HEADER = <<~MARKDOWN
                           ^^^^^^^^^^^
scripts/lib/glfm/constants.rb:48:34: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    ES_SNAPSHOT_SPEC_MD_HEADER = <<~MARKDOWN
                                 ^^^^^^^^^^^
scripts/lib/glfm/constants.rb:58:28: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
    EXAMPLE_BEGIN_STRING = "#{EXAMPLE_BACKTICKS_STRING} example"
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
scripts/perf/gc/collect_gc_stats.rb:59:14: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
CSV_HEADER = "setting,value,#{CSV_USED_GCSTAT_KEYS},RSS,gc_time_s,cpu_utime_s,cpu_stime_s,real_time_s\n"
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
scripts/perf/gc/collect_gc_stats.rb:62:14: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
RAILS_ROOT = "#{SCRIPT_PATH}/../../../"
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
scripts/qa/testcases-check:6:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
TESTCASE_FORMAT = %r{https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/\d+}.freeze
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
scripts/review_apps/automated_cleanup.rb:17:37: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    HELM_ALLOWED_NAMESPACES_REGEX = /^review-(?!apps).+/.freeze
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
scripts/validate_migration_timestamps:9:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
MIGRATION_TIMESTAMP_REGEX = /\A(?<version>\d{#{VERSION_DIGITS}})_/.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/contracts/provider/helpers/contract_source_helper.rb:13:22: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
    SUB_PATH_REGEX = %r{project/(?<file_path>.*?)_helper.rb}.freeze
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/initializers/secret_token_spec.rb:10:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  let(:hex_key) { /\h{128}/.freeze }
                  ^^^^^^^^^^^^^^^^
spec/initializers/secret_token_spec.rb:11:19: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  let(:rsa_key) { /\A-----BEGIN RSA PRIVATE KEY-----\n.+\n-----END RSA PRIVATE KEY-----\n\Z/m.freeze }
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/support/helpers/jira_integration_helpers.rb:5:14: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
  JIRA_API = "#{JIRA_URL}/rest/api/2"
             ^^^^^^^^^^^^^^^^^^^^^^^^
spec/support/helpers/next_found_instance_of.rb:5:27: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  HELPER_METHOD_PATTERN = /(?:allow|expect)_next_found_(?<number>\d+)_instances_of/.freeze
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/support/helpers/require_migration.rb:18:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  SPEC_FILE_PATTERN = %r{.+/(?:\d+_)?(?<file_name>.+)_spec\.rb}.freeze
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/support/matchers/exceed_query_limit.rb:66:33: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
  MARGINALIA_ANNOTATION_REGEX = %r{\s*/\*.*\*/}.freeze
                                ^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/config_files.rb:11:37: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      MISSING_INTRODUCED_BY_REGEX = /^\+?(?<attr_name>\s*introduced_by_url):\s*$/.freeze
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/customer_success.rb:14:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      FILE_PATH_REGEX = %r{((ee|jh)/)?config/metrics/.+\.yml}.freeze
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/customer_success.rb:15:26: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      CATEGORY_CHANGED = /data_category: operational/i.freeze
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/datateam.rb:16:25: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      FILE_PATH_REGEX = %r{((ee|jh)/)?config/metrics(/.+\.yml)}.freeze
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/datateam.rb:17:37: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PERFORMANCE_INDICATOR_REGEX = %r{gmau|smau|paid_gmau|umau}.freeze
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/datateam.rb:18:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      METRIC_REMOVED = %r{\+status: removed}.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/datateam.rb:19:24: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      DATABASE_REGEX = %r{\Adb/structure\.sql}.freeze
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/specs.rb:20:31: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      PROJECT_FACTORY_REGEX = / ...
                              ^
tooling/danger/specs.rb:40:32: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      MATCH_WITH_ARRAY_REGEX = /(?<to>to\(?\s*)(?<matcher>match|eq)(?<expectation>[( ]?\[(?=.*,)[^\]]+)/.freeze
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/specs.rb:46:40: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      RSPEC_TOP_LEVEL_DESCRIBE_REGEX = /^\+.?RSpec\.describe(.+)/.freeze
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/stable_branch.rb:8:29: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      STABLE_BRANCH_REGEX = %r{\A(?<version>\d+-\d+)-stable-ee\z}.freeze
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tooling/danger/stable_branch.rb:11:23: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      VERSION_REGEX = %r{ ...
                      ^^^
tooling/danger/stable_branch.rb:23:36: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      MAINTENANCE_POLICY_MESSAGE = <<~MSG
                                   ^^^^^^
tooling/danger/stable_branch.rb:27:31: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      FEATURE_ERROR_MESSAGE = <<~MSG
                              ^^^^^^
tooling/danger/stable_branch.rb:31:27: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      BUG_ERROR_MESSAGE = <<~MSG
                          ^^^^^^
tooling/danger/stable_branch.rb:35:31: C: [Correctable] Style/MutableConstant: Freeze mutable objects assigned to constants.
      VERSION_ERROR_MESSAGE = <<~MSG
                              ^^^^^^
tooling/lib/tooling/mappings/view_to_js_mappings.rb:11:37: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      HTML_ATTRIBUTE_VALUE_REGEXP = /js-[-\w]+/.freeze
                                    ^^^^^^^^^^^^^^^^^^
tooling/lib/tooling/mappings/view_to_js_mappings.rb:14:41: C: [Correctable] Style/RedundantFreeze: Do not freeze immutable objects, as freezing them has no effect.
      RAILS_PARTIAL_INVOCATION_REGEXP = %r{(?:render|render_if_exist)(?: |\()(?:partial: ?)?['"]([\w/-]+)['"]}.freeze
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

285 files inspected, 469 offenses detected, 469 offenses autocorrectable

Screenshots

Verifying Ruby 3.0 and Ruby 2.7.

Pipeline
Screenshot_from_2023-02-06_16-26-25

Despite the 🔴 verify-ruby-3.0 it's all :green:

How to set up and validate locally

asdf local ruby 2.7.7
unset REVEAL_RUBOCOP_TODO
bundle exec rubocop --parallel --only Style/MutableConstant,Style/RedundantFreeze

# No offenses
asdf local ruby 2.7.7
export REVEAL_RUBOCOP_TODO=1
bundle exec rubocop --parallel --only Style/MutableConstant,Style/RedundantFreeze


asdf local ruby 3.0.5
unset REVEAL_RUBOCOP_TODO
bundle exec rubocop --parallel --only Style/MutableConstant,Style/RedundantFreeze

# To see current offenses
asdf local ruby 3.0.5
export REVEAL_RUBOCOP_TODO=1
bundle exec rubocop --parallel --only Style/MutableConstant,Style/RedundantFreeze

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports