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 1 commit
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
12 changes: 12 additions & 0 deletions Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,18 @@ def audit_https_availability
strict: strict?)
end

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

cask_subdir = cask.token[0].downcase
expected_path = "Casks/#{cask_subdir}/#{cask.token}.rb"
razvanazamfirei marked this conversation as resolved.
Show resolved Hide resolved

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

add_error "Cask should be located in '#{expected_path}'"
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