We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe5427b commit 7cc0ac9Copy full SHA for 7cc0ac9
1 file changed
hooks/dataform_format.sh
@@ -6,21 +6,7 @@ if ! command -v dataform >/dev/null 2>&1; then
6
exit 1
7
fi
8
9
-# Get the list of staged files
10
-files=$(git diff --cached --name-only --diff-filter=ACM | grep '\.df$')
11
-
12
-# Check if there are any Dataform files to format
13
-if [ -z "$files" ]; then
14
- echo "No Dataform files to format. Skipping pre-commit hook."
15
- exit 0
16
-fi
17
18
-# Run Dataform formatting on each file
19
-echo "Formatting Dataform files..."
20
-for file in $files; do
21
- dataform fmt $file
22
- git add $file
23
-done
+dataform format
24
25
echo "Dataform formatting complete. Please review the changes before committing."
26
exit 0
0 commit comments