Fix detecting nested EE constants in RuboCop
What does this MR do?
The InjectEnterpriseEditionModule cop would not detect certain nested EE
constants such as EE::Foo::Bar::Baz
. This could result in it not
enforcing prepend
being placed on the last line. This commit fixes
this by just performing a string match on the line, instead of relying
on AST matching.
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9189
Does this MR meet the acceptance criteria?
-
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Yorick Peterse