Skip to content

[frontend] ci: run shellcheck on scripts #1513

@alxndrsn

Description

@alxndrsn

Currently there are violations in all scripts in the repo:

$ git ls-files \*.sh | xargs shellcheck

In bin/check-images.sh line 37:
find src -type f -name '*.png' | xargs -I{} bash -c "
^----------------------------^ SC2038 (warning): Use -print0/-0 or -exec + to allow for non-alphanumeric filenames.


In e2e-tests/run-tests.sh line 60:
  wait-for-it $ODK_DOMAIN:$ODK_PORT --strict --timeout=60 -- echo '[e2e-tester] odk-central is UP!'
              ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting.
                          ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  wait-for-it "$ODK_DOMAIN":"$ODK_PORT" --strict --timeout=60 -- echo '[e2e-tester] odk-central is UP!'


In e2e-tests/run-tests.sh line 64:
  docker compose exec service node lib/bin/cli.js --email $ODK_USER user-promote
                                                          ^-------^ SC2086 (info): Double quote to prevent globbing and word splitting.

Did you mean: 
  docker compose exec service node lib/bin/cli.js --email "$ODK_USER" user-promote


In test/run.sh line 30:
	if (( $warnings > 2)); then
              ^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.


In test/run.sh line 37:
	elif (( $warnings > 0 )); then
                ^-------^ SC2004 (style): $/${} is unnecessary on arithmetic variables.

For more information:
  https://www.shellcheck.net/wiki/SC2038 -- Use -print0/-0 or -exec + to allo...
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
  https://www.shellcheck.net/wiki/SC2004 -- $/${} is unnecessary on arithmeti...

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxDeveloper workflow, automated checksfrontendRequires a change to the UI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions