New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 898564 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Feature



Sign in to add a comment

shellcheck: Support for shflags conventions

Project Member Reported by bmgordon@chromium.org, Oct 24

Issue description

Lots of scripts use shflags to manage command-line flags.  These produce tons of shellcheck warnings of a couple forms:

echo "Running ${FLAGS_count} iterations with:"
              ^-- SC2154: FLAGS_count is referenced but not assigned.

if [ ${FLAGS_errors_fatal} -eq ${FLAGS_TRUE} ]; then
                               ^-- SC2086: Double quote to prevent globbing and word splitting.

We should teach shellcheck about FLAGS_TRUE, FLAGS_FALSE, and the various 
DEFINE_* functions that create these FLAGS_NNN variables.

We might be able to use a shellcheck source directive to read the shflags file.  This would get the definitions for FLAGS_TRUE etc, but we'll still need to teach shellcheck the meaning of the DEFINE_* functions.
 

Sign in to add a comment