dev-cmd/audit: fix audit annotations
Emitting annotations currently produces:
Error: no implicit conversion of Symbol into Integer
The issue is that `problem` is an `Array` of problems which we need to
handle individually.
This commit is contained in:
parent
ec39fe7bb1
commit
f4692ddb40
@ -309,16 +309,16 @@ module Homebrew
|
|||||||
|
|
||||||
return unless ENV["GITHUB_ACTIONS"]
|
return unless ENV["GITHUB_ACTIONS"]
|
||||||
|
|
||||||
annotations = formula_results.merge(cask_results).flat_map do |path, problem|
|
annotations = formula_results.merge(cask_results).flat_map do |path, problems|
|
||||||
next if problem.blank?
|
problems.map do |problem|
|
||||||
|
GitHub::Actions::Annotation.new(
|
||||||
GitHub::Actions::Annotation.new(
|
:error,
|
||||||
:error,
|
problem[:message],
|
||||||
problem[:message],
|
file: path,
|
||||||
file: path,
|
line: problem[:location]&.line,
|
||||||
line: problem[:location]&.line,
|
column: problem[:location]&.column,
|
||||||
column: problem[:location]&.column,
|
)
|
||||||
)
|
end
|
||||||
end.compact
|
end.compact
|
||||||
|
|
||||||
annotations.each do |annotation|
|
annotations.each do |annotation|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user