We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e84dae commit 7998645Copy full SHA for 7998645
.pre-commit-hooks.yaml
@@ -0,0 +1,9 @@
1
+- id: swag-fmt
2
+ name: swag-fmt
3
+ entry: run-swag-fmt.sh
4
+ language: script
5
+ always_run: false
6
+ fail_fast: false
7
+ verbose: false
8
+ description: 'Run swag fmt to format Swaggo comments in your code'
9
+ args: []
run-swag-fmt.sh
+#!/usr/bin/env bash
+
+if ! which swag &> /dev/null
+then
+ echo "swag could not be found. Please ensure it is installed and available on your PATH."
+ exit 1
+fi
+swag fmt $@
0 commit comments