#!/bin/bash
set -exuo pipefail

job_dir=$(dirname "${BASH_SOURCE[0]}")

skip=$(cat <<EOF
ABOUT-NLS
configure
config.guess
configure~
*/debian/*
*/debian/.debhelper/*
*/doc/prebuilt/*
*/.git/*
*/.gradle/*
*/contrib/ci/*
*/contrib/wallet-core/*
*/frontend/*
*/build/*
*/*.xsd
*/*.xml
*/libeufin-nexus/src/main/kotlin/tech/libeufin/nexus/iso20022/ExternalCodeSets.kt
*/libeufin-nexus/src/main/kotlin/tech/libeufin/nexus/iso20022/BankTransactionCode.kt
*/libeufin-common/src/main/kotlin/registry.kt
*/testbench/test/*
EOF
);

echo Current directory: `pwd`

codespell -I "${job_dir}"/dictionary.txt -S ${skip//$'\n'/,}
