#!/bin/sh
# Copyright © 2018-2019 Collabora Ltd
# SPDX-License-Identifier: BSD-3-Clause
# (See debian/copyright)

set -e
set -u

if ! command -v shellcheck >/dev/null 2>&1; then
    echo "1..0 # SKIP shellcheck not available"
    exit 0
fi

n=0
for shell_script in \
        debian/tests/platform \
        debian/tests/sdk \
        tests/*.sh \
        tests/platform/*.t \
        tests/sdk/*.t \
        ; do
    n=$((n + 1))
    if shellcheck "$shell_script"; then
        echo "ok $n - $shell_script"
    else
        echo "not ok $n # TODO - $shell_script"
    fi
done

echo "1..$n"
