<commit_before>require 'find'
require 'pathname'

# -----------------------
# --- functions
# -----------------------

def xamarin_ios_project(project_file_path)
  query = 'Xamarin.iOS'
  unified_ios_api = File.readlines(project_file_path).grep(/#{query}/).size > 0

  query = 'monotouch'
  ios_api = File.readlines(project_file_path).grep(/#{query}/).size > 0

  (unified_ios_api || ios_api)
end

# -----------------------
# --- main
# -----------------------

project_root_dir = Dir.pwd
solution_file_paths = Find.find(project_root_dir).select { |p| /.*\.sln$/ =~ p }
puts "solution_file_paths: #{solution_file_paths}"

ios_project_file_paths = []
(solution_file_paths).each do |solution_file_path|
  pn = Pathname.new(solution_file_path)
  solution_base_dir_path, solution_file_name = pn.split

  query = '([^"]*.csproj)'
  matches = File.readlines("#{solution_file_path}").select { |n| n[/#{query}/i] }
  (matches).each do |match|
    splits = match.split(', ')
    project_file_name = splits[1].gsub(/\\/, '/').delete! '""'
    project_file_path = File.join(solution_base_dir_path, project_file_name)

    puts
    puts "raw_path: #{project_file_path}"
    puts

    if xamarin_ios_project(project_file_path)
      ios_project_file_paths.push(project_file_path)
    end
  end
end

puts
puts "xamarin ios projects: #{ios_project_file_paths}"
puts

exit_code = ios_project_file_paths.count > 0

puts
puts "exit_code: #{exit_code}"
puts

exit (ios_project_file_paths.count > 0 ? 0 : 1)
<commit_msg>log fixes<commit_after>require 'find'
require 'pathname'

# -----------------------
# --- functions
# -----------------------

def xamarin_ios_project(project_file_path)
  query = 'Xamarin.iOS'
  unified_ios_api = File.readlines(project_file_path).grep(/#{query}/).size > 0

  query = 'monotouch'
  ios_api = File.readlines(project_file_path).grep(/#{query}/).size > 0

  (unified_ios_api || ios_api)
end

# -----------------------
# --- main
# -----------------------

project_root_dir = Dir.pwd
solution_file_paths = Find.find(project_root_dir).select { |p| /.*\.sln$/ =~ p }

ios_project_file_paths = []
(solution_file_paths).each do |solution_file_path|
  puts "-----------------------------------"
  puts "solution_file_path: #{solution_file_path}"
  puts

  pn = Pathname.new(solution_file_path)
  solution_base_dir_path, solution_file_name = pn.split

  query = '([^"]*.csproj)'
  matches = File.readlines("#{solution_file_path}").select { |n| n[/#{query}/i] }
  (matches).each do |match|
    splits = match.split(', ')
    project_file_name = splits[1].gsub(/\\/, '/').delete! '""'
    project_file_path = File.join(solution_base_dir_path, project_file_name)

    puts
    puts "project_file_path: #{project_file_path}"
    puts

    is_xamarin_ios = xamarin_ios_project(project_file_path)

    puts
    puts "is_xamarin_ios: #{is_xamarin_ios}"
    puts

    if is_xamarin_ios
      ios_project_file_paths.push(project_file_path)
    end

    puts "----------------"

  end

  puts
  puts "-----------------------------------"
  puts
end

puts
puts "xamarin ios projects: #{ios_project_file_paths}"
puts

exit (ios_project_file_paths.count > 0 ? 0 : 1)

{'fraction_non_alphanumeric': 0.21448908573236317, 'fraction_numerical': 0.004112622587788674, 'mean_word_length': 2.8845208845208847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1499825', 'n_tokens_mistral': 1158, 'n_tokens_neox': 1131, 'n_words': 182}