Skip to content

Commit 7cc0ac9

Browse files
author
Hugo Rialan
committed
fix
1 parent fe5427b commit 7cc0ac9

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

hooks/dataform_format.sh

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,7 @@ if ! command -v dataform >/dev/null 2>&1; then
66
exit 1
77
fi
88

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
9+
dataform format
2410

2511
echo "Dataform formatting complete. Please review the changes before committing."
2612
exit 0

0 commit comments

Comments
 (0)