Skip to content

Commit

Permalink
Update process_periphery_output.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
porter-stripe committed Sep 27, 2024
1 parent a42f3ac commit b7863ec
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions ci_scripts/dead_code/process_periphery_output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,10 @@
output_json_file = ARGV[1]

unused_code = {}
processed_lines = 0
matched_lines = 0
skipped_lines = 0

File.foreach(periphery_output_file) do |line|
line.chomp!

# Increment the total processed lines
processed_lines += 1

# Process lines that contain ".swift" and either "unused" or "warning" (case-insensitive)
if line.include?('.swift') && (line.downcase.include?('unused') || line.downcase.include?('warning'))
# Split the line into up to 4 parts based on colon
Expand Down Expand Up @@ -48,14 +42,11 @@
# Assign the same string as both key and value
unused_code[full_warning] = full_warning

matched_lines += 1
else
puts "Skipping improperly formatted line: #{line}"
skipped_lines += 1
end
else
# Handle lines that don't match criteria
skipped_lines += 1
end
end

Expand Down

0 comments on commit b7863ec

Please sign in to comment.