Resolve non-auto-correctable RuboCop offenses (Exclude-only) in .rubocop_todo/**/*.yml

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

Problem

.rubocop_todo/**/*.yml contains non-auto-correctable (RuboCop) offenses which cannot be fixed automatically:

grep --recursive --files-without-match --null "Cop supports --autocorrect" .rubocop_todo/ | while IFS= read -r -d '' cop_file; do
    cop_name="$(head -n 2 "$cop_file" | tail -n 1 | grep --color=never --only-match --perl-regexp "^[a-zA-Z/]+")"
    num_exclusions=$(grep -c -- "    - " "$cop_file")
    printf -- '- [`%s`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/%s) (%d entries, [chart](https://ck3g.gitlab.io/rubocop-burndown/#%s))\n' "$cop_name" "$cop_file" "$num_exclusions" "$cop_name"
done | sort

Implementation guide

Same as #239356, but instead of rubocop --autocorrect, find the corresponding RuboCop in https://gitlab.com/gitlab-org/gitlab/-/tree/master/rubocop/cop to view the requirements, and then manually fix the issue.

The List

Edited by Jonston Chan