Skip to content

Fix cop remaining cop offenses for Style/HashTransformation

Problem

In !55110 (merged) and https://gitlab.com/gitlab-org/gitlab-styles/-/merge_requests/75 we've introduced a new 👮 Style/HashTransformation.

This MR enabled the 👮 so new offenses are prevented. Current offenses still needs to be fixed. This issue tracks its progress.

Proposed solution

Resolve auto-correctable file by letting RuboCop auto-correct them automatically 🎉

  1. Pick a file from The List below e.g. app/controllers/projects/branches_controller.rb
  2. Create a branch (e.g. pl-rubocop-style-hashtransformation-1)
  3. Delete the file from .rubocop_manual_todo.yml
  4. Let RuboCop auto-correct the offenses via e.g. bundle exec rubocop --auto-correct --only Style/HashTransformation app/controllers/projects/branches_controller.rb
  5. Check changes files and adjust if needed
  6. Commit and create a merge request adding Contributes to #322739 and static code analysis label
  7. Tick off the checkbox(es) and add the MR or mention this merge request in this issue
  8. 🎉

The List

Edited by Peter Leitzen