<commit_before>#!/usr/bin/env escript

main([Filename]) ->
    try
        ok = envx_lib_application:check_config(Filename)
    catch
        _ExcType:ExcReason ->
            ok = io:format(
                   "~nError in config file '~s':~n\t~p~n",
                   [Filename, ExcReason]),
            halt(1)
    end.<commit_msg>check erlang config tool: improve diagnostics<commit_after>#!/usr/bin/env escript

main([Filename]) ->
    try
        ok = envx_lib_application:check_config(Filename)
    catch
        _ExcType:{Line, erl_parse, Message} ->
            ok = io:format(
                   "~nError in Erlang config file '~s'. Line ~w: ~s~n",
                   [Filename, Line, Message]),
            halt(1);
        _ExcType:ExcReason ->
            ok = io:format(
                   "~nError in config file '~s':~n\t~p~n",
                   [Filename, ExcReason]),
            halt(1)
    end.
{'fraction_non_alphanumeric': 0.13114754098360656, 'fraction_numerical': 0.003278688524590164, 'mean_word_length': 1.7100591715976332, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '3273259', 'n_tokens_mistral': 294, 'n_tokens_neox': 284, 'n_words': 60}