aboutsummaryrefslogtreecommitdiffstats
path: root/bin/lint
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2024-10-26 19:57:32 -0500
committerJP Dillingham <jp@dillingham.me>2024-10-26 19:57:32 -0500
commit18434d7f6f942517162a88fb213f6fcca0f9d38d (patch)
treea499fe5003cb3e863713d86a2e755ccf597e691d /bin/lint
parent12df99113ff82c4997fec5be126091944de0b33f (diff)
downloadslskd-18434d7f6f942517162a88fb213f6fcca0f9d38d.tar.gz
add lint script
Diffstat (limited to 'bin/lint')
-rw-r--r--bin/lint30
1 files changed, 30 insertions, 0 deletions
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