Move JH specific RuboCop excludes into main .rubocop.yml

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

While reviewing some other code I've stumbled up on https://jihulab.com/gitlab-cn/gitlab/-/blob/main-jh/jh/rubocop/jh-rubocop.yml.

It seems this RuboCop configuration adds more excludes specifically for jh/.

I was wondering if we could add those excludes into the main .rubocop.yml. Note that we already have some JH specific excludes there: https://gitlab.com/gitlab-org/gitlab/-/blob/11c4a0bd8f5256f0d502a4f56999abcc925b875c/.rubocop.yml#L131

Ideally, we'd find a solution to reduce the noise of adding exclusions for CE, EE and JH somehow 🤷

Define permanent and temporary exclusions in JH

See #356503 (comment 887711477)

Use ERB in main .rubocop.yml

For example, instead of

Some/Cop:
  Exclude:
    - 'spec/**/*'
    - 'ee/spec/**/*'
    - 'jh/spec/**/*'

we could do

# ERB is allowed in top-level `.rubocop.yml`.
<% dir_pattern = '{,ee/,jh/}' %>

...
Some/Cop:
  Exclude:
    - '<%= dir_pattern %>spec/**/*'

It's neither pretty nor I've verified it would work though 😅

Refs !81220 (comment 883542362)

Edited by 🤖 GitLab Bot 🤖