Skip to content

Commit

Permalink
formula_auditor: repo should never be nil, so use T.must
Browse files Browse the repository at this point in the history
  • Loading branch information
issyl0 committed Aug 10, 2024
1 parent b6fbd51 commit a3ed94e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Library/Homebrew/formula_auditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,9 @@ def audit_specs
tag ||= stable.version

if @online
return if owner.nil? || repo.nil?
return if owner.nil?

error = SharedAudits.gitlab_release(owner, repo, tag, formula:)
error = SharedAudits.gitlab_release(owner, T.must(repo), tag, formula:)

Check warning on line 789 in Library/Homebrew/formula_auditor.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/formula_auditor.rb#L787-L789

Added lines #L787 - L789 were not covered by tests
problem error if error
end
when %r{^https://github.com/([\w-]+)/([\w-]+)}
Expand All @@ -796,9 +796,9 @@ def audit_specs
tag ||= formula.stable.specs[:tag]

if @online
return if owner.nil? || repo.nil?
return if owner.nil?

error = SharedAudits.github_release(owner, repo, tag, formula:)
error = SharedAudits.github_release(owner, T.must(repo), tag, formula:)

Check warning on line 801 in Library/Homebrew/formula_auditor.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/formula_auditor.rb#L799-L801

Added lines #L799 - L801 were not covered by tests
problem error if error
end
end
Expand Down

0 comments on commit a3ed94e

Please sign in to comment.