Skip to content

Fix detecting nested EE constants in RuboCop

Yorick Peterse requested to merge fix-rubocop-ee-module-injection-detection into master

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?

Edited by Yorick Peterse

Merge request reports