Skip to content

Commit

Permalink
Disable the new custom cop on CI so we can gradually fix formulae
Browse files Browse the repository at this point in the history
  • Loading branch information
issyl0 committed Jul 24, 2024
1 parent 4cd1507 commit 16a759d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Library/.rubocop_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Inherit from ./.rubocop.yml.
inherit_from: ./.rubocop.yml

Homebrew/NoFileutilsRmrf:
Enabled: true
Include:
- "/**/Casks/**/*.rb"
- "**/Casks/**/*.rb"
5 changes: 5 additions & 0 deletions Library/Homebrew/style.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 16a759d

Please sign in to comment.