Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cask/audit: audit for appropriate sharding directory #15849

Merged
merged 3 commits into from
Aug 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,17 @@
strict: strict?)
end

sig { void }
def audit_cask_path
return if cask.tap != "homebrew/cask"

expected_path = cask.tap.new_cask_path(cask.token)

Check warning on line 724 in Library/Homebrew/cask/audit.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/cask/audit.rb#L724

Added line #L724 was not covered by tests

return if cask.sourcefile_path.to_s.end_with?(expected_path)

add_error "Cask should be located in '#{expected_path}'"

Check warning on line 728 in Library/Homebrew/cask/audit.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/cask/audit.rb#L728

Added line #L728 was not covered by tests
end

# sig {
# params(url_to_check: T.any(String, URL), url_type: String, cask_token: String, tap: Tap,
# options: T.untyped).void
Expand Down
Loading