rubocop-i18n: Identify cases which couldn't be autofixed
This is a follow-up issue from https://gitlab.com/gitlab-org/gitlab-ce/issues/57968 and it's part of https://gitlab.com/gitlab-org/manage/issues/20.
In https://gitlab.com/gitlab-org/gitlab-ce/issues/57968 we introduced rubocop-i18n
to lint for unwrapped strings (in simple/common cases) in ruby files.
These cops report a large number of offenses that should be reviewed manually to find clear edge cases. One of the rules has autofix functionality but its impact is very limited. @lbennett has forked it and written broader acting autofix functionality but its changes are yet to be verified.
We should generate a list of cases that can't be autofixed to be worked through manually or to have autofix functionality written for them.
Current list as of https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/253308347:
Offenses:
lib/gitlab/bitbucket_server_import/importer.rb:58:20: C: GetText/DecorateString: decorator is missing around sentence
message: 'The remote data could not be fully imported.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/content_disposition.rb:8:13: C: GetText/DecorateString: decorator is missing around sentence
raise <<~MSG
^^^^^^
lib/gitlab/manifest_import/manifest.rb:25:20: C: GetText/DecorateString: decorator is missing around sentence
@errors = ['The uploaded file is not a valid XML file.']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/manifest_import/manifest.rb:43:22: C: GetText/DecorateString: decorator is missing around sentence
@errors << 'Make sure a <remote> tag is present and is valid.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/manifest_import/manifest.rb:47:22: C: GetText/DecorateString: decorator is missing around sentence
@errors << 'Make sure every <project> tag has name and path attributes.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/config/entry/simplifiable.rb:13:34: C: GetText/DecorateString: decorator is missing around sentence
raise ArgumentError, 'UndefinedStrategy not available!'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/access.rb:75:11: C: GetText/DecorateString: decorator is missing around sentence
"Not protected: Both developers and maintainers can push new commits, force push, or delete the branch." => PROTECTION_NONE,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/access.rb:76:11: C: GetText/DecorateString: decorator is missing around sentence
"Protected against pushes: Developers cannot push new commits, but are allowed to accept merge requests to the branch. Maintainers can push to the branch." => PROTECTION_DEV_CAN_MERGE,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/access.rb:77:11: C: GetText/DecorateString: decorator is missing around sentence
"Partially protected: Both developers and maintainers can push new commits, but cannot force push or delete the branch." => PROTECTION_DEV_CAN_PUSH,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/access.rb:78:11: C: GetText/DecorateString: decorator is missing around sentence
"Fully protected: Developers cannot push new commits, but maintainers can. No-one can force push or delete the branch." => PROTECTION_FULL
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/metrics/dashboard/base_service.rb:13:24: C: GetText/DecorateString: decorator is missing around sentence
return error('Insufficient permissions.', :unauthorized) unless allowed?
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/extendable/entry.rb:24:36: C: GetText/DecorateString: decorator is missing around sentence
raise StandardError, 'Invalid entry key!'
^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/root.rb:28:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Default configuration for all jobs.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/root.rb:32:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'List of external YAML files to include.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/root.rb:36:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Script that will be executed before each job.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/root.rb:40:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Docker image that will be used to execute jobs.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/root.rb:44:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Docker images that will be linked to the container.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/root.rb:48:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Script that will be executed after each job.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/root.rb:52:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Environment variables that will be used.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/root.rb:56:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Configuration of stages for this pipeline.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/root.rb:64:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Configure caching between build jobs.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/default.rb:25:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Script that will be executed before each job.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/default.rb:29:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Docker image that will be used to execute jobs.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/default.rb:33:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Docker images that will be linked to the container.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/default.rb:37:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Script that will be executed after each job.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/default.rb:41:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Configure caching between build jobs.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:45:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Global before script overridden in this job.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:49:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Commands that will be executed in this job.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:52:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Pipeline stage this job will be executed into.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:58:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Commands that will be executed when finishing job.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:62:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Cache definition for this job.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:66:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Image that will be used to execute this job.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:70:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Services that will be used to execute this job.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:74:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Refs policy this job will be executed for.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:78:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Refs policy this job will be executed for.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:81:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Environment variables available for this job.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:84:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Artifacts configuration for this job.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:87:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Environment configuration for this job.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:90:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Coverage configuration for this job.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/job.rb:93:29: C: GetText/DecorateString: decorator is missing around sentence
description: 'Retry configuration for this job.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/cache.rb:23:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Cache key used to define a cache affinity.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/cache.rb:26:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Cache all untracked files.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/config/entry/cache.rb:29:26: C: GetText/DecorateString: decorator is missing around sentence
description: 'Specify which paths should be cached across builds.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/chain/validate/abilities.rb:14:30: C: GetText/DecorateString: decorator is missing around sentence
return error('Pipelines are disabled!')
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/chain/populate.rb:33:28: C: GetText/DecorateString: decorator is missing around sentence
return error('No stages / jobs for this pipeline.')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/chain/populate.rb:37:28: C: GetText/DecorateString: decorator is missing around sentence
return error('Failed to build the pipeline!')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexer.rb:57:43: C: GetText/DecorateString: decorator is missing around sentence
raise Lexer::SyntaxError, 'Unknown lexeme found!'
^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexer.rb:61:39: C: GetText/DecorateString: decorator is missing around sentence
raise Lexer::SyntaxError, 'Too many tokens!'
^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/pattern.rb:17:43: C: GetText/DecorateString: decorator is missing around sentence
raise Lexer::SyntaxError, 'Invalid regular expression!'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/pipeline/expression/lexeme/pattern.rb:24:47: C: GetText/DecorateString: decorator is missing around sentence
raise Expression::RuntimeError, 'Invalid regular expression!'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/build/artifacts/path.rb:31:38: C: GetText/DecorateString: decorator is missing around sentence
raise ArgumentError, 'Path contains zero byte character!'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/build/artifacts/path.rb:35:38: C: GetText/DecorateString: decorator is missing around sentence
raise ArgumentError, 'Path contains non-UTF-8 byte sequence!'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/build/artifacts/metadata.rb:32:34: C: GetText/DecorateString: decorator is missing around sentence
raise ParserError, 'Errors field not found!' unless errors
^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/build/artifacts/metadata.rb:37:36: C: GetText/DecorateString: decorator is missing around sentence
raise ParserError, 'Invalid errors field!'
^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/build/artifacts/metadata.rb:88:36: C: GetText/DecorateString: decorator is missing around sentence
raise ParserError, 'Artifacts metadata file empty!'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/ci/build/artifacts/metadata.rb:92:36: C: GetText/DecorateString: decorator is missing around sentence
raise ParserError, 'Invalid version!'
^^^^^^^^^^^^^^^^^^
lib/gitlab/legacy_github_import/importer.rb:89:20: C: GetText/DecorateString: decorator is missing around sentence
message: 'The remote data could not be fully imported.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/omniauth_initializer.rb:84:15: C: GetText/DecorateString: decorator is missing around sentence
raise "Service Ticket not found." unless Gitlab::Auth::OAuth::Session.valid?(:cas3, ticket)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/untrusted_regexp/ruby_syntax.rb:30:28: C: GetText/DecorateString: decorator is missing around sentence
raise RegexpError, 'Pattern is not string!' unless pattern.is_a?(String)
^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/untrusted_regexp/ruby_syntax.rb:33:28: C: GetText/DecorateString: decorator is missing around sentence
raise RegexpError, 'Invalid regular expression!' if matches.nil?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/git/push.rb:47:32: C: GetText/DecorateString: decorator is missing around sentence
raise ArgumentError, 'Unable to calculate modified paths!'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/auth/user_access_denied_reason.rb:15:11: C: GetText/DecorateString: decorator is missing around sentence
"You (#{@user.to_reference}) must accept the Terms of Service in order to perform this action. "\ ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/auth/user_access_denied_reason.rb:18:11: C: GetText/DecorateString: decorator is missing around sentence
"Your account has been blocked."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/checks/push_check.rb:8:11: C: Cop/LineBreakAroundConditionalBlock: Add a line break around conditional blocks
unless can_push? ...
^^^^^^^^^^^^^^^^
lib/gitlab/git_access.rb:129:78: W: Lint/UnneededCopDisableDirective: Unnecessary disabling of GetText/DecorateString.
raise UnauthorizedError, "Your SSH key #{actor.errors[:key].first}." # rubocop:disable GetText/DecorateString
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/git_access.rb:137:86: W: Lint/UnneededCopDisableDirective: Unnecessary disabling of GetText/DecorateString.
raise UnauthorizedError, "Git access over #{protocol.upcase} is not allowed" # rubocop:disable GetText/DecorateString
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/git_access.rb:228:108: W: Lint/UnneededCopDisableDirective: Unnecessary disabling of GetText/DecorateString.
raise ProjectCreationError, "Could not create project: #{project.errors.full_messages.join(', ')}" # rubocop:disable GetText/DecorateString
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/task_helpers.rb:132:14: C: GetText/DecorateString: decorator is missing around sentence
puts " Things may work\/fail for the wrong reasons."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/path_regex.rb:195:7: C: GetText/DecorateString: decorator is missing around sentence
"can contain only letters, digits, '_', '-' and '.'. " \ ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/git_access_wiki.rb:6:22: C: GetText/DecorateString: decorator is missing around sentence
read_only: "You can't push code to a read-only GitLab instance.",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/git_access_wiki.rb:7:22: C: GetText/DecorateString: decorator is missing around sentence
write_to_wiki: "You are not allowed to write to this project's wiki."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/regex.rb:12:7: C: GetText/DecorateString: decorator is missing around sentence
"can contain only letters, digits, emojis, '_', '.', dash, space. " \ ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/bitbucket_import/importer.rb:41:20: C: GetText/DecorateString: decorator is missing around sentence
message: 'The remote data could not be fully imported.',
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/sidekiq_signals.rb:12:7: C: GetText/DecorateString: decorator is missing around sentence
"Intercepting signal handlers: #{REPLACE_SIGNALS.join(", ")} failed. " \ ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/gitaly_client/storage_settings.rb:14:33: C: GetText/DecorateString: decorator is missing around sentence
INVALID_STORAGE_MESSAGE = <<~MSG.freeze
^^^^^^
lib/gitlab/quick_actions/merge_request_actions.rb:12:21: C: GetText/DecorateString: decorator is missing around sentence
explanation 'Merges this merge request when the pipeline succeeds.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/action_view_output/context.rb:32:9: C: GetText/DecorateString: decorator is missing around sentence
raise 'This module is no longer needed in Rails 6. Use ActionView::Context instead.'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/gitlab/graphql/docs/helper.rb:15:11: C: GetText/DecorateString: decorator is missing around sentence
<<-MD.strip_heredoc
^^^^^
lib/mattermost/session.rb:6:7: C: GetText/DecorateString: decorator is missing around sentence
'No session could be set up, is Mattermost configured with Single Sign On?'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/file_size_validator.rb:12:88: W: Lint/UnneededCopDisableDirective: Unnecessary disabling of GetText/DecorateString.
raise ArgumentError, ":in and :within must be a Range" unless range.is_a?(Range) # rubocop:disable GetText/DecorateString
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/file_size_validator.rb:32:80: W: Lint/UnneededCopDisableDirective: Unnecessary disabling of GetText/DecorateString.
raise ArgumentError, ":#{key} must be a nonnegative Integer or symbol" # rubocop:disable GetText/DecorateString
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/file_size_validator.rb:39:126: W: Lint/UnneededCopDisableDirective: Unnecessary disabling of GetText/DecorateString.
raise(ArgumentError, "A CarrierWave::Uploader::Base object was expected") unless value.is_a? CarrierWave::Uploader::Base # rubocop:disable GetText/DecorateString
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/concerns/group_descendant.rb:44:37: C: GetText/DecorateString: decorator is missing around sentence
exception = ArgumentError.new <<~MSG
^^^^^^
app/models/project_services/asana_service.rb:18:5: C: GetText/DecorateString: decorator is missing around sentence
'This service adds commit messages as comments to Asana tasks. ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/models/application_setting.rb:121:34: C: GetText/DecorateString: decorator is missing around sentence
presence: { message: 'Domain blacklist cannot be empty if Blacklist is enabled.' },
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/services/self_monitoring/project/create_service.rb:10:29: C: GetText/DecorateString: decorator is missing around sentence
DEFAULT_DESCRIPTION = <<~HEREDOC
^^^^^^^^^^
app/services/ci/ensure_stage_service.rb:34:31: C: GetText/DecorateString: decorator is missing around sentence
raise EnsureStageError, <<~EOS
^^^^^^
app/services/clusters/applications/uninstall_service.rb:25:27: C: GetText/DecorateString: decorator is missing around sentence
app.make_errored!('Failed to uninstall.')
^^^^^^^^^^^^^^^^^^^^^^
app/controllers/graphql_controller.rb:74:20: C: GetText/DecorateString: decorator is missing around sentence
access_denied!("API not accessible for user.") unless can?(current_user, :access_api)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/graphql_controller.rb:80:18: C: GetText/DecorateString: decorator is missing around sentence
render_error("Not found!", status: :not_found)
^^^^^^^^^^^^
app/controllers/projects/git_http_client_controller.rb:86:19: C: GetText/DecorateString: decorator is missing around sentence
render plain: "HTTP Basic: Access denied\n" \ ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/workers/mail_scheduler/notification_service_worker.rb:66:13: C: GetText/DecorateString: decorator is missing around sentence
raise <<~MSG
^^^^^^
8050 files inspected, 92 offenses detected