<commit_before>#!/bin/bash

text=`head -1 LICENSE.txt`

ERROR_COUNT=0
while read file
do
    head -1 ${file} | grep -q "${text}"
    if [ $? -ne 0 ]; then
        echo "$file is missing license header."
        ERROR_COUNT+=1
    fi
done < <(git grep -l "" | grep "\.go")

exit $ERROR_COUNT
<commit_msg>Use git ls-files instead of find<commit_after>#!/bin/bash

text=`head -1 LICENSE.txt`

ERROR_COUNT=0
while read file
do
    head -1 ${file} | grep -q "${text}"
    if [ $? -ne 0 ]; then
        echo "$file is missing license header."
        ERROR_COUNT+=1
    fi
done < <(git ls-files "\.go")

exit $ERROR_COUNT

{'fraction_non_alphanumeric': 0.15584415584415584, 'fraction_numerical': 0.016233766233766232, 'mean_word_length': 2.608187134502924, 'pattern_counts': {'":': 0, '<': 7, '<?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': '458222', 'n_tokens_mistral': 233, 'n_tokens_neox': 218, 'n_words': 73}