Commit graph

8 commits

Author SHA1 Message Date
GitLab Bot
fa7ac2663b Add latest changes from gitlab-org/gitlab@master 2020-06-24 06:09:01 +00:00
GitLab Bot
36497af2ff Add latest changes from gitlab-org/gitlab@master 2020-06-17 06:08:43 +00:00
GitLab Bot
76784ebd4a Add latest changes from gitlab-org/gitlab@master 2020-05-26 03:08:02 +00:00
GitLab Bot
8ff63012e9 Add latest changes from gitlab-org/gitlab@master 2020-05-12 15:10:33 +00:00
Yorick Peterse
5445f71e60
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.
2019-08-28 17:20:06 +02:00
Yorick Peterse
cc6619a80f
Extend cop for verifying injecting of EE modules
This extends the InjectEnterpriseEditionModule RuboCop cop so that it
verifies the following:

1. The line number the injection occurs on (as before).
2. The method used (e.g. prepend instead of prepend_if_ee).
3. The argument type passed when using the new module injection methods.
2019-07-30 14:52:54 +02:00
Yorick Peterse
9722158c15
Fix detecting nested EE constants in RuboCop
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.
2019-01-16 16:48:18 +01:00
Yorick Peterse
7c58055631
Added Cop for injecting EE modules
This Cop enforces the rule that injecting EE modules (using prepend,
include, or extend) is done by placing the injection on the last line of
a file, instead of somewhere in the middle. By placing these lines at
the very end, merge conflicts will not happen.
2018-12-13 16:09:21 +01:00