#!/bin/sh

cd $(dirname $(realpath $0))

echo "running hello-world.go"
if ! go run .; then
  echo "cannot run hello-world.go"
  exit 1
fi

# As new versions of golangci-lint release, this test will need to be "fixed and updated."
# This tool has new versions constantly; things change often! New tests added, old tests deprecated.
echo "running: golangci-lint run --enable-all --disable maligned,interfacer,golint,scopelint"
if ! golangci-lint run --enable-all --disable maligned,interfacer,golint,scopelint,forbidigo; then
  echo "Linting go file(s) failed"
  exit 1
fi
