summaryrefslogtreecommitdiff
path: root/rubocop
diff options
context:
space:
mode:
authorYorick Peterse <yorick@yorickpeterse.com>2019-08-28 17:20:06 +0200
committerYorick Peterse <yorick@yorickpeterse.com>2019-08-28 17:20:06 +0200
commit5445f71e608b7dd5dac068006a578b32fabdf6ac (patch)
tree8b000c448e06c340fee111edba5f1f19f5d4cf6b /rubocop
parent4b23faab2c4428a9cde7f16a08b3e6059069890c (diff)
downloadgitlab-ce-5445f71e608b7dd5dac068006a578b32fabdf6ac.tar.gz
Fix InjectEnterpriseEditionModule cop for qa/
This ensures the InjectEnterpriseEditionModule cop is able to detect the prepend patterns used in the qa/ directory. Previously it would not detect them as all EE QA modules reside in QA::EE, and not the top-level EE namespace.
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/cop/inject_enterprise_edition_module.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/rubocop/cop/inject_enterprise_edition_module.rb b/rubocop/cop/inject_enterprise_edition_module.rb
index e0e1b2d6c7d..6f007e667f2 100644
--- a/rubocop/cop/inject_enterprise_edition_module.rb
+++ b/rubocop/cop/inject_enterprise_edition_module.rb
@@ -24,7 +24,7 @@ module RuboCop
# We use `match?` here instead of RuboCop's AST matching, as this makes
# it far easier to handle nested constants such as `EE::Foo::Bar::Baz`.
- line.match?(/(\s|\()('|")?(::)?EE::/)
+ line.match?(/(\s|\()('|")?(::)?(QA::)?EE::/)
end
def on_send(node)