forked from bunkerity/bunkerweb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run pre-commit-config and apply it, also lint jinja template files
- Loading branch information
1 parent
fb06e43
commit b512f72
Showing
50 changed files
with
5,800 additions
and
6,202 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
src/ui/templates/profile.html:hashicorp-tf-password:343 | ||
src/ui/templates/account.html:hashicorp-tf-password:194 | ||
src/ui/templates/account.html:hashicorp-tf-password:255 | ||
src/ui/templates/account.html:hashicorp-tf-password:292 | ||
src/ui/templates/account.html:hashicorp-tf-password:329 | ||
src/ui/templates/account.html:hashicorp-tf-password:417 | ||
src/ui/templates/account.html:hashicorp-tf-password:470 | ||
src/ui/templates/settings_plugins.html:hashicorp-tf-password:87 | ||
src/ui/templates/settings_plugins.html:hashicorp-tf-password:297 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
first_arg=$1 | ||
args=("$@") | ||
|
||
if [ "$first_arg" == "manual" ]; then | ||
echo "⏳ Running djLint for web UI Jinja files..." | ||
djlint --reformat --profile=jinja --exclude=src/ui/templates/setup.html src/ui/templates | ||
ret=$? | ||
if [ $ret -ne 0 ]; then | ||
echo "❌ djLint failed for web UI template files. Exiting..." | ||
exit $ret | ||
fi | ||
echo "✅ djLint for web UI template files passed." | ||
|
||
|
||
echo "⏳ Running djLint for core plugins UI Jinja files..." | ||
djlint --reformat --profile=jinja src/common/core/*/ui | ||
ret=$? | ||
if [ $ret -ne 0 ]; then | ||
echo "❌ djLint failed for core plugins UI template files. Exiting..." | ||
exit $ret | ||
fi | ||
echo "✅ djLint for core plugins UI template files passed." | ||
|
||
echo "⏳ Running djLint for documentation Jinja files..." | ||
djlint --reformat --profile=jinja docs/ | ||
ret=$? | ||
if [ $ret -ne 0 ]; then | ||
echo "❌ djLint failed for documentation files. Exiting..." | ||
exit $ret | ||
fi | ||
echo "✅ djLint for documentation files passed." | ||
|
||
echo "✅ All djLint commands passed" | ||
else | ||
echo "⏳ Running custom djLint command with args: ${args[*]}" | ||
djlint --reformat --profile=jinja "${args[@]}" | ||
ret=$? | ||
if [ $ret -ne 0 ]; then | ||
echo "❌ djLint failed for custom command. Exiting..." | ||
exit $ret | ||
fi | ||
echo "✅ djLint for custom command passed." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.