Skip to content

Commit

Permalink
Read only last line
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhammetDilmac committed Mar 1, 2024
1 parent 8a02d42 commit 6c393a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rdjson_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

SEVERITIES = %w[INFO WARNING ERROR].freeze

piped_json = STDIN.each_line.to_a.join
piped_json = STDIN.each_line.to_a.last
json_input = JSON.parse(piped_json)
results = json_input['results']

Expand Down

0 comments on commit 6c393a9

Please sign in to comment.