"minne/Classes") # fuiͷexitstatusɺΘΕ͍ͯͳ͍ΫϥεͷͰɺ # Bridging-Header͕ඞͣͨͬͯ͠·͏ͷͰɺ # 2ͭҎ্ͷ݁Ռ͕͋Δ߹௨͍ͯ͠Δɻ return status.exitstatus >= 2 ? std_out : "" end def get_dead_swift_code std_out, _ = Open3.capture2("periphery", "scan") r = /minne.*(Struct|Class) .*is unused$/ filtered_results_array = std_out.to_enum(:scan,r).map {$&}.flatten return filtered_results_array.join("\n") end # Main dead_objc_result = get_dead_objc_code dead_swift_result = get_dead_swift_code mention = "<!subteam^S1DDSFQSF|minne-ios>" message = "#{mention}, Unused files exist:\n" notify_slack(message + dead_objc_result) unless dead_objc_result == "" notify_slack(message + dead_swift_result) unless dead_swift_result == "" 38