From 18434d7f6f942517162a88fb213f6fcca0f9d38d Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 26 Oct 2024 19:57:32 -0500 Subject: add lint script --- bin/lint | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 bin/lint (limited to 'bin') diff --git a/bin/lint b/bin/lint new file mode 100644 index 00000000..4daf9c42 --- /dev/null +++ b/bin/lint @@ -0,0 +1,30 @@ +#!/bin/bash +set -e + +fix=false + +while test $# -gt 0; do + case "$1" in + -h|--help) + echo 'options:' + echo '-h, --help show help' + echo '--fix attempt to fix violations' + exit 0 + ;; + --fix) + fix=true + shift + ;; + *) + break + ;; + esac +done + +if [ "$fix" == false ]; then + echo $'\n🛠️ dotnet format --verbosity normal --verify-no-changes\n' + dotnet format --verbosity normal --verify-no-changes +else + echo $'\n🛠️ dotnet format --verbosity normal\n' + dotnet format --verbosity normal +fi \ No newline at end of file -- cgit v1.2.3