<commit_before>#! /bin/bash -e
# set -x

is_ci() {
    test -n "${JENKINS_URL}"
    return $?
}

run_flake8() {
    >&2 echo -e '*** Running flake8\n'
    if is_ci; then
        flake8 --format='pylint' --output-file="outputs/_output_flake8.out" $@
    else
        flake8 $@
    fi
}

run_flake8 ${@:-setup.py scripts/all.py src/son_analyze tests son-scikit/src/son_scikit son-scikit/tests}<commit_msg>Make the flake8 output compatible with jenkins<commit_after>#! /bin/bash -e
# set -x

is_ci() {
    test -n "${JENKINS_URL}"
    return $?
}

run_flake8() {
    >&2 echo -e '*** Running flake8\n'
    if is_ci; then
        flake8 --output-file="outputs/_output_flake8.out" $@
    else
        flake8 $@
    fi
}

run_flake8 ${@:-setup.py scripts/all.py src/son_analyze tests son-scikit/src/son_scikit son-scikit/tests}
{'fraction_non_alphanumeric': 0.15956151035322777, 'fraction_numerical': 0.018270401948842874, 'mean_word_length': 2.770642201834862, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1409965', 'n_tokens_mistral': 349, 'n_tokens_neox': 340, 'n_words': 68}