Skip to content

Commit

Permalink
Remvoed puts
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiDreyer committed Oct 10, 2024
1 parent b2c3233 commit 29d5447
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions lib/ruby_ast_gen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,12 @@ def self.process_file(file_path, output_dir, exclude_regex, base_dir)
relative_path = file_path.sub(%r{^.*\/}, '')
relative_input_path = file_path.sub("#{base_dir}/", '')
# Skip if the file matches the exclusion regex
puts "exlcude"
if exclude_regex && exclude_regex.match?(relative_input_path)
@logger.info "Excluding: #{relative_input_path}"
return
end

puts "before file"
return unless ruby_file?(file_path) # Skip if it's not a Ruby-related file
puts "after file"

begin
ast = parse_file(file_path, relative_input_path)
Expand All @@ -61,7 +58,6 @@ def self.process_file(file_path, output_dir, exclude_regex, base_dir)
File.write(output_path, JSON.pretty_generate(ast))
@logger.info "Processed: #{relative_input_path} -> #{output_path}"
rescue StandardError => e
puts "actually errored, logger"
@logger.error "'#{relative_input_path}' - #{e.message}"
end
end
Expand Down
1 change: 0 additions & 1 deletion lib/ruby_ast_gen/node_handling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def self.add_node_properties(node_type, base_map, file_path)
base_map[:condition] = children[0]
base_map[:body] = children[1]
when :for, :for_post
puts children
base_map[:variable] = children[0]
base_map[:collection] = children[1]
base_map[:body] = children[2]
Expand Down

0 comments on commit 29d5447

Please sign in to comment.