<commit_before>#/bin/bash
prof=${1:-".profile.cov"}
echo "mode: count" > $prof

cleanup() {
  if [[ $tmpprof != "" && -f $tmpprof ]]; then
    rm -f $tmpprof
  fi
  exit
}
trap cleanup INT QUIT TERM EXIT

for dir in $(find . -not -path '*/[._]*' -type d); do
  if ls $dir/*.go > /dev/null 2>&1; then
    tmpprof=$dir/profile.tmp
    go test -covermode=count -coverprofile=$tmpprof $dir
    if [[ -f $tmpprof ]]; then
      cat $tmpprof | tail -n +2 >> $prof
      rm $tmpprof
    fi
  fi
done<commit_msg>remove double brackets syntax<commit_after>#/bin/sh
prof=${1:-".profile.cov"}
echo "mode: count" > $prof

cleanup() {
  if [ $tmpprof != "" && -f $tmpprof ]; then
    rm -f $tmpprof
  fi
  exit
}
trap cleanup INT QUIT TERM EXIT

for dir in $(find . -not -path '*/[._]*' -type d); do
  if ls $dir/*.go > /dev/null 2>&1; then
    tmpprof=$dir/profile.tmp
    go test -covermode=count -coverprofile=$tmpprof $dir
    if [ -f $tmpprof ]; then
      cat $tmpprof | tail -n +2 >> $prof
      rm $tmpprof
    fi
  fi
done
{'fraction_non_alphanumeric': 0.17681728880157171, 'fraction_numerical': 0.007858546168958742, 'mean_word_length': 2.5880281690140845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '2041575', 'n_tokens_mistral': 431, 'n_tokens_neox': 419, 'n_words': 120}