Skip to content

Commit

Permalink
style: fix path checking.
Browse files Browse the repository at this point in the history
- Add all necessary files to the path, using globs when necessary.
- Remove `Pathname` monkeypatch
  • Loading branch information
MikeMcQuaid committed Jun 12, 2024
1 parent 1fa25b2 commit 101fcb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 0 additions & 5 deletions Library/Homebrew/extend/pathname.rb
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,6 @@ def dylib?
false
end

sig { returns(T::Boolean) }
def tap?
!Tap.from_path(self).nil?
end

sig { returns(T::Array[String]) }
def rpaths
[]
Expand Down
7 changes: 5 additions & 2 deletions Library/Homebrew/style.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ def self.check_style_impl(files, output_type,
when ".yml"
actionlint_files << path if path.realpath.to_s.include?("/.github/workflows/")
else
ruby_files << path if path.tap?
shell_files << path if path.realpath == HOMEBREW_BREW_FILE.realpath
if path
ruby_files << path
shell_files += path.glob("**/*.sh")
actionlint_files += path.glob(".github/workflows/*.ya?ml")
end
end
end

Expand Down

0 comments on commit 101fcb6

Please sign in to comment.