diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-03 12:10:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-03 12:10:11 +0300 |
commit | f3189d2a01f0b44915b5d7a2301af1445f759c9f (patch) | |
tree | b2d476f044cd6fa9396771217a8c89089c424f57 /rubocop | |
parent | 14c866bb2ff6550420257cee619828a7510433dc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/gitlab/mark_used_feature_flags.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/rubocop/cop/gitlab/mark_used_feature_flags.rb b/rubocop/cop/gitlab/mark_used_feature_flags.rb index 03ee4805f4e..d3c5cfb827e 100644 --- a/rubocop/cop/gitlab/mark_used_feature_flags.rb +++ b/rubocop/cop/gitlab/mark_used_feature_flags.rb @@ -255,10 +255,17 @@ module RuboCop ] # For EE additionally process `ee/` feature flags - if File.exist?(File.expand_path('../../../ee/app/models/license.rb', __dir__)) && !%w[true 1].include?(ENV['FOSS_ONLY'].to_s) + is_ee = File.exist?(File.expand_path('../../../ee/app/models/license.rb', __dir__)) && !%w[true 1].include?(ENV['FOSS_ONLY'].to_s) + if is_ee flags_paths << 'ee/config/feature_flags/**/*.yml' end + # For JH additionally process `jh/` feature flags + is_jh = is_ee && Dir.exist?(File.expand_path('../../../jh', __dir__)) && !%w[true 1].include?(ENV['EE_ONLY'].to_s) + if is_jh + flags_paths << 'jh/config/feature_flags/**/*.yml' + end + flags_paths.each_with_object([]) do |flags_path, memo| flags_path = File.expand_path("../../../#{flags_path}", __dir__) Dir.glob(flags_path).each do |path| |