Fix Rubocop Style/PercentLiteralDelimiters offence
What does this MR do and why?
Fix Rubocop Style/PercentLiteralDelimiters offence
ee/lib/**
rubocop/**
scripts/**
sidekiq_cluster/**
tooling/**
❯ REVEAL_RUBOCOP_TODO=1 bundle exec rubocop --show-cops Style/PercentLiteralDelimiters
# Supports --autocorrect
Style/PercentLiteralDelimiters:
Description: Use `%`-literal delimiters consistently.
StyleGuide: "#percent-literal-braces"
Enabled: true
VersionAdded: '0.19'
PreferredDelimiters:
default: "()"
"%i": "[]"
"%I": "[]"
"%r": "{}"
"%w": "[]"
"%W": "[]"
VersionChanged: '0.48'
Implementations
The code this is MR is autocorrected by running the following commands.
$ REVEAL_RUBOCOP_TODO=1 bundle exec rubocop --only Style/PercentLiteralDelimiters --parallel -a ee/lib/**
$ REVEAL_RUBOCOP_TODO=1 bundle exec rubocop --only Style/PercentLiteralDelimiters --parallel -a rubocop/**
$ REVEAL_RUBOCOP_TODO=1 bundle exec rubocop --only Style/PercentLiteralDelimiters --parallel -a scripts/**
$ REVEAL_RUBOCOP_TODO=1 bundle exec rubocop --only Style/PercentLiteralDelimiters --parallel -a sidekiq_cluster/**
$ REVEAL_RUBOCOP_TODO=1 bundle exec rubocop --only Style/PercentLiteralDelimiters --parallel -a tooling/**
$ bundle exec rake rubocop:todo:generate[Style/PercentLiteralDelimiters]
Generating RuboCop TODOs with:
rubocop --parallel --format RuboCop::Formatter::TodoFormatter --only Style/PercentLiteralDelimiters
This might take a while...
Written to .rubocop_todo/style/percent_literal_delimiters.yml
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Running this command should not result in error.
$ bundle exec rubocop --only Style/PercentLiteralDelimiters --parallel
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.