Add shfmt config

This commit is contained in:
Andreas Zweili 2023-08-27 14:47:44 +02:00
parent 45a2d9ed22
commit 9fcb2a1a39
2 changed files with 21 additions and 21 deletions

3
.editorconfig Normal file
View File

@ -0,0 +1,3 @@
[*.sh]
indent_style = space
indent_size = 4

5
dev.sh
View File

@ -104,7 +104,6 @@ clean () {
descriptions["clean"]="Reset the project to a fresh state including the database."
tasks["clean"]=clean
cleanall() {
git clean -xdf
}
@ -123,7 +122,6 @@ check (){
descriptions["check"]="Run the linter and tests."
tasks["check"]=check
test() {
export DJANGO_SETTINGS_MODULE=network_inventory.settings.ram_test
pytest -nauto --nomigrations --cov-config="$PROJECT_DIR/.coveragerc" --cov-report=html "$PROJECT_DIR/src"
@ -140,8 +138,7 @@ tasks["update"]=update
# only one task at a time
if [ $# != 1 ]; then
printf "usage: dev <task_name>\n\n"
for task in "${!tasks[@]}"
do
for task in "${!tasks[@]}"; do
echo "$task - ${descriptions[$task]}"
done