<commit_before>#!/bin/bash

# Pylint report
# <NAME>, 2016

me=ipol #$(whoami)
modulesDir="/home/${me}/ipolDevel/ipol_demo/modules/"
report="/home/${me}/ipolDevel/ci_tests/pylint_report.txt"
modules="core archive blobs demoinfo demorunner dispatcher"

#truncate -s 0 ${report}
today=$(date)
echo "IPOL PyLint report on ${today}" > ${report}
echo >> ${report}

# PyLint test on each IPOL module
for module in ${modules}
do
    echo "**** MODULE: ${module}" >> ${report}
    pylint --rcfile=/home/${me}/ipolDevel/ci_tests/pylintrc ${modulesDir}${module}/*.py >> ${report}
done

# Send report by email
sendTo=$(cat /home/ipol/ipolDevel/ci_tests/send_to.txt)
echo "PyLint report" | mutt -a ${report} -s "[ipolDevel] CI test: PyLint" -- ${sendTo}<commit_msg>[ci_tests/pylint] Changed to the directory of the module<commit_after>#!/bin/bash

# Pylint report
# <NAME>, 2016

me=miguel #ipol #$(whoami)
modulesDir="/home/${me}/ipolDevel/ipol_demo/modules/"
report="/home/${me}/ipolDevel/ci_tests/pylint_report.txt"
modules="core archive blobs demoinfo demorunner dispatcher"

#truncate -s 0 ${report}
today=$(date)
echo "IPOL PyLint report on ${today}" > ${report}
echo >> ${report}

# PyLint test on each IPOL module
cur_dir=$(pwd)

for module in ${modules}
do
    echo "**** MODULE: ${module}" >> ${report}
    cd ${modulesDir}${module}
    pylint --rcfile=/home/${me}/ipolDevel/ci_tests/pylintrc *.py >> ${report}
    cd ${cur_dir}
done

# Send report by email
sendTo=$(cat /home/ipol/ipolDevel/ci_tests/send_to.txt)
echo "PyLint report" | mutt -a ${report} -s "[ipolDevel] CI test: PyLint" -- ${sendTo}
{'fraction_non_alphanumeric': 0.18147684605757197, 'fraction_numerical': 0.006257822277847309, 'mean_word_length': 4.900369003690037, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '762558', 'n_tokens_mistral': 626, 'n_tokens_neox': 609, 'n_words': 146}