aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-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