#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# Shellcheck warnings disabled
# - SC1017: Literal carriage return
SHELLCHECK_DISABLES="SC1017"

# Find executable files in $SCRIPT_DIR without extensions and pipe them into shellcheck
find "$SCRIPT_DIR" -type f ! -name "*.*" -executable -print0 |      \
    xargs -0 shellcheck -e "$SHELLCHECK_DISABLES"                   \
#

# Proess scripts in templates directory
shellcheck -e "$SHELLCHECK_DISABLES" "$SCRIPT_DIR/../templates"/*.sh
