Skip to content

Commit

Permalink
style: also handle directories called "docs" as docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Jun 12, 2024
1 parent d937559 commit 32ecafc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Library/Homebrew/style.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def self.run_rubocop(files, output_type,
files&.map!(&:expand_path)
if files.blank? || files == [HOMEBREW_REPOSITORY]
files = [HOMEBREW_LIBRARY_PATH]
elsif files.any? { |f| f.to_s.start_with? HOMEBREW_REPOSITORY/"docs" }
elsif files.any? { |f| (f.to_s.start_with? HOMEBREW_REPOSITORY/"docs") || (f.basename == "docs") }
args << "--config" << (HOMEBREW_REPOSITORY/"docs/.rubocop.yml")
elsif files.none? { |f| f.to_s.start_with? HOMEBREW_LIBRARY_PATH }
args << "--config" << (HOMEBREW_LIBRARY/".rubocop.yml")
Expand Down

0 comments on commit 32ecafc

Please sign in to comment.