Create a new job to check that EE-specific lines are minimal
Similar to https://gitlab.com/gitlab-org/gitlab-ee/issues/4942, we should have a job which would complain if we're adding too many EE-specific lines to files outside of ee/ directory.
We could diff 3 times to get relevant changes:
git diff ce/master..ee/master --numstat -- . '!ee' > current_diff
git diff ce/master..HEAD --numstat -- . '!ee' > updated_diff
Then we diff against the diff:
diff current_diff updated_diff
We sum the additions and deletions, and see if the sum is getting lower. If so, we're reducing difference, that's good. If it's getting more, complain it.
This is just an example. If I am going to implement it, I'll parse the output and compare the numbers instead of running diff current_diff updated_diff
We could also share some codes in scripts/ee-files-location-check.
Edited by Lin Jen-Shin