Resolve "Add a 'custom cop' to RuboCop that bans ENV assignment"
What does this MR do?
This adds a new RSpec::EnvAssignment
that forbids calling ENV#[]=
in specs and autocorrects to use stub_env
instead.
Does this MR meet the acceptance criteria?
-
Tests added for this feature/bug - Review
-
Has been reviewed by Backend
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
If the ee_compat_check
failed, an EE compatibility MR has been created (should be done by a maintainer if you're an external contributor): https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3170
What are the relevant issue numbers?
Closes #18765 (closed)
Edited by Rémy Coutable