From a603790dedc6c9d52fe98ae2fb33f6fdeab3cf31 Mon Sep 17 00:00:00 2001 From: Johannes Vedder Date: Mon, 22 Jan 2024 02:41:54 +0100 Subject: [PATCH] fix lints --- .github/ISSUE_TEMPLATE/bug_report.md | 14 +++++++------- .github/scripts/generate-uml.bash | 12 ++++++------ .github/workflows/deploy-apps.yml | 2 +- .github/workflows/e2e_tests.yml | 2 +- .github/workflows/release_app.yml | 2 +- CONTRIBUTING.md | 2 +- docker/supabase/scripts/dump_data.sh | 2 +- docker/supabase/scripts/dump_schema.sh | 2 +- docker/supabase/scripts/execute_sql.sh | 7 ++----- docs/README.md | 2 +- 10 files changed, 22 insertions(+), 25 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index dd84ea782..b2f690035 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -24,15 +24,15 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] **Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] +- Device: [e.g. iPhone6] +- OS: [e.g. iOS8.1] +- Browser [e.g. stock browser, safari] +- Version [e.g. 22] **Additional context** Add any other context about the problem here. diff --git a/.github/scripts/generate-uml.bash b/.github/scripts/generate-uml.bash index 4867e3fd0..a760082c5 100755 --- a/.github/scripts/generate-uml.bash +++ b/.github/scripts/generate-uml.bash @@ -1,7 +1,7 @@ #!/bin/bash # repo root at ../.. from this file's directory -root=$(realpath $(dirname $(realpath $0))/../..) +root="$(realpath "$(dirname "$(realpath "$0")")/../..")" docs_dir="$root/docs/uml" @@ -16,13 +16,13 @@ prev_update="$(git log -n 1 --pretty=format:%H -- "$docs_dir")" # regenerated declare -A dirty # get all directories that have changed since prev_update -for changed in $(git diff --name-only $prev_update \ +for changed in $(git diff --name-only "$prev_update" \ | grep --extended-regexp '(flutter_common|core|designer_v2|app)/lib/.*\.dart' \ | xargs dirname \ | sort --unique \ ); do # set changed dir as dirty for all parents until we reach lib - while [[ -n $(grep --extended-regexp '[^/]*/lib' <<< "$changed") ]]; do + while grep --extended-regexp -q '[^/]*/lib' <<< "$changed"; do dirty[$changed]=1 changed="$(dirname "$changed")" done @@ -45,10 +45,10 @@ for d in "${!dirty[@]}"; do echo "Generating diagram for $d" # ensure destination dir extists - mkdir -p $(dirname "$out") + mkdir -p "$(dirname "$out")" # go to package dir, i.e. first path component - cd "$root/$(cut -d/ -f1 <<< "$d")" + cd "$root/$(cut -d/ -f1 <<< "$d")" || exit # uml generator gets confused with generated files so we have to remove # them find . -type f -name '*.g.dart' -exec rm {} \; @@ -58,7 +58,7 @@ for d in "${!dirty[@]}"; do --exclude=State --exclude=StatefulWidget --exclude=StatelessWidget \ -b nomnoml \ -s "$(cut -d/ -f2- <<< "$d")" \ - > $tmpf + > "$tmpf" npx --yes nomnoml "$tmpf" "$out" # get deleted generated files back from git diff --git a/.github/workflows/deploy-apps.yml b/.github/workflows/deploy-apps.yml index 2800be683..320718ab4 100644 --- a/.github/workflows/deploy-apps.yml +++ b/.github/workflows/deploy-apps.yml @@ -21,7 +21,7 @@ jobs: with: workflowId: 'publish_pubdev.yml' - name: Get the tag name - run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV" - name: Checkout code uses: actions/checkout@v3 - name: Set up ruby env diff --git a/.github/workflows/e2e_tests.yml b/.github/workflows/e2e_tests.yml index 628a3af50..a1f5f9d1a 100644 --- a/.github/workflows/e2e_tests.yml +++ b/.github/workflows/e2e_tests.yml @@ -31,7 +31,7 @@ jobs: docker compose -f docker/supabase/docker-compose.yml up -d docker compose -f docker/proxy/docker-compose-proxy.yml up -d while [ "$(docker inspect --format='{{.State.Health.Status}}' supabase-db)" != "healthy" ]; do sleep 1; done - cat ./database/app_config.sql.example | docker exec -i supabase-db psql -U postgres -d postgres + docker exec -i supabase-db psql -U postgres -d postgres < ./database/app_config.sql.example - name: Start Chrome Driver run: | diff --git a/.github/workflows/release_app.yml b/.github/workflows/release_app.yml index 20098c2c8..fe42d4410 100644 --- a/.github/workflows/release_app.yml +++ b/.github/workflows/release_app.yml @@ -16,7 +16,7 @@ jobs: with: workflowId: 'publish_pubdev.yml' - name: Get the tag name - run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV" - name: Checkout code uses: actions/checkout@v3 - name: Decrypt files diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9db1672c9..508848533 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,7 +22,7 @@ executing Melos scripts. Use `melos