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

Issue 891826 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug

Blocked on:
issue 844166



Sign in to add a comment

shellcheck: patch in support for `local` in POSIX scripts

Project Member Reported by vapier@chromium.org, Oct 3

Issue description

until upstream makes this more flexible, we'll have to patch in `local` support in shellcheck for POSIX shell scripts per our shell guidelines

upstream request:
  https://github.com/koalaman/shellcheck/issues/1341

once we have it patched locally, we'll need to figure out the tricium side of things too
 
Cc: mka@chromium.org vapier@chromium.org
 Issue gerrit:9802  has been merged into this issue.
Owner: bmgordon@chromium.org
Status: Started (was: Available)
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 24

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/b05727f475b1f48c58c45ebbf7fb25387f31585c

commit b05727f475b1f48c58c45ebbf7fb25387f31585c
Author: Benjamin Gordon <bmgordon@chromium.org>
Date: Wed Oct 24 20:03:14 2018

shellcheck: Allow local in POSIX scripts

Officially, local isn't allowed in POSIX shell scripts, so shellcheck
warns about it under SC2039.  All the shells we use actually allow it and
we make use of it, so we don't want to warn about it.  An upstream
discussion was started at https://github.com/koalaman/shellcheck/issues/1341,
but until that's resolved, we can locally patch out the check.

BUG=chromium:891826
TEST=shellcheck src/platform2/init/dev_utils.sh

Change-Id: I6b68f98862052facf868a81f645c827ab551860a
Reviewed-on: https://chromium-review.googlesource.com/1295291
Commit-Ready: Benjamin Gordon <bmgordon@chromium.org>
Tested-by: Benjamin Gordon <bmgordon@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[add] https://crrev.com/b05727f475b1f48c58c45ebbf7fb25387f31585c/dev-util/shellcheck/files/shellcheck-0.5.0-allowlocal.patch
[rename] https://crrev.com/b05727f475b1f48c58c45ebbf7fb25387f31585c/dev-util/shellcheck/shellcheck-0.5.0-r3.ebuild

Sign in to add a comment