Fix Gitlab/StrongMemoizeAttr offenses
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you can request access to GitLab Duo.
What does this MR do and why?
It fixes some of the Gitlab/StrongMemoizeAttr offenses.
Changelog: other
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Removing the following files from exclusion list:
- 'app/components/pajamas/avatar_component.rb'
- 'app/controllers/application_controller.rb'
- 'app/controllers/concerns/boards_actions.rb'
- 'app/controllers/concerns/creates_commit.rb'
- 'app/controllers/concerns/find_snippet.rb'
- 'app/controllers/concerns/impersonation.rb'
- 'app/controllers/concerns/issuable_actions.rb'
- 'app/controllers/concerns/issuable_collections.rb'
- 'app/controllers/concerns/known_sign_in.rb'
- 'app/controllers/ide_controller.rb'
- 'app/controllers/import/github_controller.rb'
- 'app/controllers/invites_controller.rb'
and running bundle exec rubocop --only Gitlab/StrongMemoizeAttr on master branch and the current branch yields the following results respectively:
| Before | After |
|---|---|
| 39399 files inspected, | 39399 files inspected |
| 14 offenses detected, | no offenses detected |
| 14 offenses autocorrectable |
How to set up and validate locally
Run bundle exec rubocop --only Gitlab/StrongMemoizeAttr from the terminal to validate the changes locally.
Edited by Mansoor Khan