Merge pull request #15269 from MikeMcQuaid/audit_no_warnings
dev-cmd/audit: remove unused warnings key.
This commit is contained in:
commit
71de574285
@ -239,7 +239,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
[f.path, { errors: fa.problems + fa.new_formula_problems, warnings: [] }]
|
[f.path, fa.problems + fa.new_formula_problems]
|
||||||
end
|
end
|
||||||
|
|
||||||
cask_results = if audit_casks.empty?
|
cask_results = if audit_casks.empty?
|
||||||
@ -272,11 +272,11 @@ module Homebrew
|
|||||||
only: args.only,
|
only: args.only,
|
||||||
except: args.except,
|
except: args.except,
|
||||||
)
|
)
|
||||||
[cask.sourcefile_path, { errors: errors, warnings: [] }]
|
[cask.sourcefile_path, errors]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
failed_casks = cask_results.reject { |_, result| result[:errors].empty? }
|
failed_casks = cask_results.select { |_, problems| problems.present? }
|
||||||
|
|
||||||
cask_count = failed_casks.count
|
cask_count = failed_casks.count
|
||||||
|
|
||||||
@ -309,20 +309,17 @@ module Homebrew
|
|||||||
|
|
||||||
return unless ENV["GITHUB_ACTIONS"]
|
return unless ENV["GITHUB_ACTIONS"]
|
||||||
|
|
||||||
annotations = formula_results.merge(cask_results).flat_map do |path, result|
|
annotations = formula_results.merge(cask_results).flat_map do |path, problem|
|
||||||
(
|
next if problem.blank?
|
||||||
result[:warnings].map { |w| [:warning, w] } +
|
|
||||||
result[:errors].map { |e| [:error, e] }
|
GitHub::Actions::Annotation.new(
|
||||||
).map do |type, problem|
|
:error,
|
||||||
GitHub::Actions::Annotation.new(
|
problem[:message],
|
||||||
type,
|
file: path,
|
||||||
problem[:message],
|
line: problem[:location]&.line,
|
||||||
file: path,
|
column: problem[:location]&.column,
|
||||||
line: problem[:location]&.line,
|
)
|
||||||
column: problem[:location]&.column,
|
end.compact
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
annotations.each do |annotation|
|
annotations.each do |annotation|
|
||||||
puts annotation if annotation.relevant?
|
puts annotation if annotation.relevant?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user