style: use long shfmt arguments.
This allows removing documentation explaining them.
This commit is contained in:
parent
8a5f6645b8
commit
bf34f21065
@ -240,16 +240,8 @@ module Homebrew
|
|||||||
files.delete(HOMEBREW_REPOSITORY/"completions/bash/brew")
|
files.delete(HOMEBREW_REPOSITORY/"completions/bash/brew")
|
||||||
files.delete(HOMEBREW_REPOSITORY/"Dockerfile")
|
files.delete(HOMEBREW_REPOSITORY/"Dockerfile")
|
||||||
|
|
||||||
# shfmt options:
|
args = ["--language-dialect", "bash", "--indent", "2", "--case-indent", "--", *files]
|
||||||
# -i 2 : indent by 2 spaces
|
args.unshift("--write") if fix # need to add before "--"
|
||||||
# -ci : indent switch cases
|
|
||||||
# -ln bash : language variant to parse ("bash")
|
|
||||||
# -w : write result to file instead of stdout (inplace fixing)
|
|
||||||
# "--" is needed for `utils/shfmt.sh`
|
|
||||||
args = ["-i", "2", "-ci", "-ln", "bash", "--", *files]
|
|
||||||
|
|
||||||
# Do inplace fixing
|
|
||||||
args.unshift("-w") if fix # need to add before "--"
|
|
||||||
|
|
||||||
system shfmt, *args
|
system shfmt, *args
|
||||||
$CHILD_STATUS.success?
|
$CHILD_STATUS.success?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user