-module(cleam). -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). -export([main/0]). -spec main() -> nil. main() -> Ast_info = internal@ast:files_paths_with_ast( {files_dir, <<"src"/utf8>>}, {some, {files_dir, <<"test"/utf8>>}} ), Not_used_fun = internal@checker:not_used_functions( {files_dir, <<"src"/utf8>>}, Ast_info ), gleam@list:each( Not_used_fun, fun(Not_used_fun@1) -> {{public_fun, Public_fun}, {file_path, File_path}} = case Not_used_fun@1 of {{public_fun, _}, {file_path, _}} -> Not_used_fun@1; _assert_fail -> erlang:error(#{gleam_error => let_assert, message => <<"Assertion pattern match failed"/utf8>>, value => _assert_fail, module => <<"cleam"/utf8>>, function => <<"main"/utf8>>, line => 13}) end, gleam@io:println_error( <<<<<<"Function not used: "/utf8, Public_fun/binary>>/binary, "; File path: "/utf8>>/binary, File_path/binary>> ) end ), Not_used_const = internal@checker:not_used_const( {files_dir, <<"src"/utf8>>}, Ast_info ), gleam@list:each( Not_used_const, fun(Not_used_const@1) -> {{public_const, Pub_const}, {file_path, File_path@1}} = case Not_used_const@1 of {{public_const, _}, {file_path, _}} -> Not_used_const@1; _assert_fail@1 -> erlang:error(#{gleam_error => let_assert, message => <<"Assertion pattern match failed"/utf8>>, value => _assert_fail@1, module => <<"cleam"/utf8>>, function => <<"main"/utf8>>, line => 20}) end, gleam@io:println_error( <<<<<<"Const not used: "/utf8, Pub_const/binary>>/binary, "; File path: "/utf8>>/binary, File_path@1/binary>> ) end ), case (gleam@list:length(Not_used_fun) > 0) orelse (gleam@list:length( Not_used_const ) > 0) of true -> erlang:halt(1); false -> erlang:halt(0) end.