Skip to content

Commit

Permalink
Ignore shellcheck warning SC3043 globally (#606)
Browse files Browse the repository at this point in the history
This warning states that "In POSIX sh, 'local' is undefined".

`local` is used extensively in the mac script, but it should be
understood by most OSes based on the information in:
https://stackoverflow.com/questions/18597697/posix-compliant-way-to-scope-variables-to-a-function-in-a-shell-script#answer-18600920

Add a line at the beginning of the script to ignore this warning
in the entire file to avoid false positives when linting locally.

Co-authored-by: rreinhardt9
  • Loading branch information
cpytel authored Mar 31, 2022
1 parent 3a82112 commit 2584a6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mac
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# Be prepared to turn your laptop (or desktop, no haters here)
# into an awesome development machine.

# shellcheck disable=SC3043

fancy_echo() {
local fmt="$1"; shift

Expand Down

0 comments on commit 2584a6e

Please sign in to comment.