<commit_before>#!/bin/bash

set -v -e -o pipefail

if [ -z "$FRONTEND" -o "$FRONTEND" \> 2.067.z ]; then
    vibe_ver=$(jq -r '.versions | .["vibe-d"]' < dub.selections.json)
    dub fetch vibe-d --version=$vibe_ver # get optional dependency
    dub test --compiler=${DC} -c library-nonet
fi

if [ "$COVERAGE" = true ]; then
    # library-nonet fails to build with coverage (Issue 13742)
    dub test --compiler=${DC} -b unittest-cov
    ./build.sh -cov
else
    ./build.sh
fi
DUB=`pwd`/bin/dub DC=${DC} test/run-unittest.sh

if [ "$COVERAGE" = true ]; then
    dub fetch doveralls
    dub run doveralls --compiler=${DC}
fi<commit_msg>Add check for trailing whitespace<commit_after>#!/bin/bash

set -v -e -o pipefail

if [ -z "$FRONTEND" -o "$FRONTEND" \> 2.067.z ]; then
    vibe_ver=$(jq -r '.versions | .["vibe-d"]' < dub.selections.json)
    dub fetch vibe-d --version=$vibe_ver # get optional dependency
    dub test --compiler=${DC} -c library-nonet
fi

if [ "$COVERAGE" = true ]; then
    # library-nonet fails to build with coverage (Issue 13742)
    dub test --compiler=${DC} -b unittest-cov
    ./build.sh -cov
else
    ./build.sh
fi
DUB=`pwd`/bin/dub DC=${DC} test/run-unittest.sh

if [ "$COVERAGE" = true ]; then
    dub fetch doveralls
    dub run doveralls --compiler=${DC}
fi

# check for trailing whitespace (needs to be done only once per build)
if [ "$COVERAGE" = true ]; then
    find . -type f -name '*.d' -exec grep -Hn "[[:blank:]]$" {} \;
fi
{'fraction_non_alphanumeric': 0.16939890710382513, 'fraction_numerical': 0.012295081967213115, 'mean_word_length': 2.9171122994652405, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4281060', 'n_tokens_mistral': 566, 'n_tokens_neox': 544, 'n_words': 165}