<commit_before>#!/bin/bash

MINRATING="9.2"
FAUCETHOME=`dirname $0`"/.."

# TODO: add clib
for src_dir in faucet tests ; do
    src_files=$FAUCETHOME/$src_dir/[a-z]*.py

    for f in $src_files ; do
        rating=`PYTHONPATH=$FAUCETHOME pylint --rcfile=/dev/null $f | grep -ohE "rated at [0-9\.]+" | sed "s/rated at //g"`
        echo pylint $f: $rating
        if [ $(bc <<< "$rating < $MINRATING") -eq 1 ] ; then
            echo "$rating below min ($MINRATING)"
            exit 1
        fi
   done
done

exit 0<commit_msg>Run pylint on clib as well.<commit_after>#!/bin/bash

MINRATING="9.2"
FAUCETHOME=`dirname $0`"/.."
PYTHONPATH=$FAUCETHOME:$FAUCETHOME/clib

for src_dir in clib faucet tests ; do
    src_files=$FAUCETHOME/$src_dir/[a-z]*.py

    for f in $src_files ; do
        rating=`PYTHONPATH=$PYTHONPATH pylint --rcfile=/dev/null $f | grep -ohE "rated at [0-9\.]+" | sed "s/rated at //g"`
        echo pylint $f: $rating
        if [ $(bc <<< "$rating < $MINRATING") -eq 1 ] ; then
            echo "$rating below min ($MINRATING)"
            exit 1
        fi
   done
done

exit 0
{'fraction_non_alphanumeric': 0.16029143897996356, 'fraction_numerical': 0.014571948998178506, 'mean_word_length': 2.434375, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, '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': '3362092', 'n_tokens_mistral': 451, 'n_tokens_neox': 414, 'n_words': 113}