Skip to content
Vidar Holen edited this page Oct 11, 2018 · 1 revision

Expected do.

Problematic code:

for file in *
  echo "$file"
done

Correct code:

for file in *
do
  echo "$file"
done

Rationale:

ShellCheck has found a loop that appears to be missing a do statement. In the problematic code, it was simply forgotten.

Verify that the do exists, and that it's in the correct place.

Exceptions:

None

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally