<commit_before>#!/bin/bash

FILE=$1
WEBDSL=${2:-bash /usr/local/bin/webdsl}

$WEBDSL clean > /dev/null 2> /dev/null
$WEBDSL test $FILE 2>&1 | cat > $FILE.out
#cat $FILE.out

echo "checking"
exec 3<&0
exec 0<"$FILE"
#printf '%s\n' "$FILE.out" |
#while read -rd $'\r' line; do
while read -r line; do
  echo $line
  if echo "$line" | grep -q "^//"; then
    pattern=`echo "$line" | sed 's/^[/]*//'`<commit_msg>allow passing a test command<commit_after>#!/bin/bash

FILE=$1
WEBDSL=${2:-bash /usr/local/bin/webdsl}
TESTARG=${3:-test}

$WEBDSL clean > /dev/null 2> /dev/null
$WEBDSL $TESTARG $FILE 2>&1 | cat > $FILE.out
#cat $FILE.out

echo "checking"
exec 3<&0
exec 0<"$FILE"
#printf '%s\n' "$FILE.out" |
#while read -rd $'\r' line; do
while read -r line; do
  echo $line
  if echo "$line" | grep -q "^//"; then
    pattern=`echo "$line" | sed 's/^[/]*//'`
{'fraction_non_alphanumeric': 0.22652582159624413, 'fraction_numerical': 0.01995305164319249, 'mean_word_length': 3.513227513227513, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '3169749', 'n_tokens_mistral': 387, 'n_tokens_neox': 368, 'n_words': 102}