Skip to content

Commit

Permalink
Merge pull request #16171 from Bo98/audit-fix
Browse files Browse the repository at this point in the history
dev-cmd/audit: fix for Ruby 3
  • Loading branch information
Bo98 authored Oct 30, 2023
2 parents 691f7f5 + 3c9eb90 commit abc0eec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Library/Homebrew/dev-cmd/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,11 @@ def self.print_problems(results, display_filename:)
end

def self.format_problem_lines(problems)
problems.map do |message:, location:, corrected:|
status = " #{Formatter.success("[corrected]")}" if corrected
problems.map do |problem|
status = " #{Formatter.success("[corrected]")}" if problem.fetch(:corrected)
location = problem.fetch(:location)
location = "#{location.line&.to_s&.prepend("line ")}#{location.column&.to_s&.prepend(", col ")}: " if location
message = problem.fetch(:message)
"* #{location}#{message.chomp.gsub("\n", "\n ")}#{status}"
end
end
Expand Down

0 comments on commit abc0eec

Please sign in to comment.