diff --git a/Library/Homebrew/style.rb b/Library/Homebrew/style.rb index 7793f003e70c2b..a734a174a241bf 100644 --- a/Library/Homebrew/style.rb +++ b/Library/Homebrew/style.rb @@ -157,6 +157,11 @@ def self.run_rubocop(files, output_type, args << "--config" << (HOMEBREW_REPOSITORY/"docs/docs_rubocop_style.yml") elsif files.any? { |f| f.to_s.start_with? HOMEBREW_LIBRARY_PATH } base_dir = HOMEBREW_LIBRARY_PATH + # If we're in GitHub Actions, use the CI config. + # TODO: Remove this once we're done incrementally enabling new custom cops. + elsif GitHub::Actions.env_set? + args << "--config" << (HOMEBREW_LIBRARY/".rubocop_ci.yml") + base_dir = HOMEBREW_LIBRARY else args << "--config" << (HOMEBREW_LIBRARY/".rubocop.yml") base_dir = HOMEBREW_LIBRARY if files.any? { |f| f.to_s.start_with? HOMEBREW_LIBRARY }