SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
80
devel/shellcheck/Makefile
Normal file
80
devel/shellcheck/Makefile
Normal file
|
@ -0,0 +1,80 @@
|
|||
COMMENT = shell script analysis tool
|
||||
|
||||
MODCABAL_STEM = ShellCheck
|
||||
MODCABAL_VERSION = 0.9.0
|
||||
MODCABAL_EXECUTABLES = shellcheck
|
||||
PKGNAME = ${DISTNAME:L}
|
||||
CATEGORIES = devel
|
||||
HOMEPAGE = https://www.shellcheck.net/
|
||||
REVISION = 0
|
||||
|
||||
MAINTAINER = Caspar Schutijser <caspar@schutijser.com>
|
||||
|
||||
# GPLv3
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
WANTLIB = c ffi gmp iconv m pthread util
|
||||
|
||||
# cabal-bundler --openbsd ShellCheck-0.9.0 --executable shellcheck
|
||||
MODULES = devel/cabal
|
||||
MODCABAL_MANIFEST = \
|
||||
Diff 0.4.1 0 \
|
||||
OneTuple 0.3.1 3 \
|
||||
QuickCheck 2.14.2 0 \
|
||||
StateVar 1.2.2 0 \
|
||||
aeson 2.1.1.0 0 \
|
||||
assoc 1.0.2 3 \
|
||||
attoparsec 0.14.4 2 \
|
||||
base-compat 0.12.2 0 \
|
||||
base-compat-batteries 0.12.2 0 \
|
||||
base-orphans 0.8.7 0 \
|
||||
bifunctors 5.5.14 0 \
|
||||
comonad 5.0.8 1 \
|
||||
contravariant 1.5.5 0 \
|
||||
data-fix 0.3.2 3 \
|
||||
distributive 0.6.2.1 1 \
|
||||
dlist 1.0 0 \
|
||||
fgl 5.8.0.0 0 \
|
||||
generically 0.1 0 \
|
||||
hashable 1.4.1.0 0 \
|
||||
indexed-traversable 0.1.2 2 \
|
||||
indexed-traversable-instances 0.1.1.1 0 \
|
||||
integer-logarithms 1.0.3.1 3 \
|
||||
primitive 0.7.4.0 0 \
|
||||
random 1.2.1.1 0 \
|
||||
regex-base 0.94.0.2 1 \
|
||||
regex-tdfa 1.3.2 0 \
|
||||
scientific 0.3.7.0 3 \
|
||||
semialign 1.2.0.1 3 \
|
||||
semigroupoids 5.3.7 0 \
|
||||
splitmix 0.1.0.4 1 \
|
||||
strict 0.4.0.1 4 \
|
||||
tagged 0.8.6.1 3 \
|
||||
text-short 0.1.5 1 \
|
||||
th-abstraction 0.4.5.0 0 \
|
||||
these 1.1.1.1 6 \
|
||||
time-compat 1.9.6.1 4 \
|
||||
transformers-compat 0.7.2 0 \
|
||||
unordered-containers 0.2.19.1 1 \
|
||||
uuid-types 1.0.5 3 \
|
||||
vector 0.13.0.0 1 \
|
||||
vector-stream 0.1.0.0 1 \
|
||||
witherable 0.4.2 3
|
||||
|
||||
LIB_DEPENDS = converters/libiconv \
|
||||
devel/gmp \
|
||||
devel/libffi
|
||||
RUN_DEPENDS-main =
|
||||
|
||||
NO_TEST = Yes
|
||||
|
||||
# pkg_add pandoc; cd ${WRKSRC}; ./manpage; cp shellcheck.1 ${FILESDIR}/
|
||||
# (and update md5)
|
||||
post-patch:
|
||||
@[ `md5 < ${WRKSRC}/shellcheck.1.md` == f06c4a4f31f71dee0aa6b1890e469d5d ] || \
|
||||
(echo "*** manpage changed; regenerate ${FILESDIR}/shellcheck.1"; sleep 3)
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${FILESDIR}/shellcheck.1 ${PREFIX}/man/man1/
|
||||
|
||||
.include <bsd.port.mk>
|
130
devel/shellcheck/distinfo
Normal file
130
devel/shellcheck/distinfo
Normal file
|
@ -0,0 +1,130 @@
|
|||
SHA256 (hackage/Diff-0.4.1.tar.gz) = /V5Kqschm8uxSDT7hYDr4KrpBZWNCtdPUzjqKQs3JnA=
|
||||
SHA256 (hackage/OneTuple-0.3.1.tar.gz) = mIU2gtUvtMw3pFzRhvvXfPJWXT31FxrMTPAmQn4QPu8=
|
||||
SHA256 (hackage/OneTuple-0.3.1_3.cabal) = /DLLdER3vvpFClOOpJdcxSPwovFYXLWjbpk2o9GOmjw=
|
||||
SHA256 (hackage/QuickCheck-2.14.2.tar.gz) = 2HtshWlrYBF1J0Nh+mIheJRAHkAeFQw8XUATrFPNNvM=
|
||||
SHA256 (hackage/ShellCheck-0.9.0.tar.gz) = q77jtynVJalZsGQjpx/joX7Qe2IgvIQ5Te/+jNgTMxw=
|
||||
SHA256 (hackage/StateVar-1.2.2.tar.gz) = Xks52jlWVqWYJ7AoBQiq/ccDNXmLUOXW/VJZYCYlGCU=
|
||||
SHA256 (hackage/aeson-2.1.1.0.tar.gz) = o66XjWfNhVSm3BHR5aTEYoDckLvFDzqHh/3SJ4Uktq0=
|
||||
SHA256 (hackage/assoc-1.0.2.tar.gz) = 2JiNxuhxjHo0VlFbdpyTNq7uxzDPhvxRdSR5af+PFE8=
|
||||
SHA256 (hackage/assoc-1.0.2_3.cabal) = k7jUOqCB5CBRFqE5989pD2CJaBYdGev7I9iE0ZsIK1c=
|
||||
SHA256 (hackage/attoparsec-0.14.4.tar.gz) = PzN/5YYkVl3hJCb2B8I+YMewnIa04638gnyhiMmXnmw=
|
||||
SHA256 (hackage/attoparsec-0.14.4_2.cabal) = wFadhsAsrdQDAX6kFNy15PfeU4DeDYqSuTN8rYTNXgI=
|
||||
SHA256 (hackage/base-compat-0.12.2.tar.gz) = pirciDpaxDb4DkrgLDxWERzxAHSS8mfCkROaZo0hUL0=
|
||||
SHA256 (hackage/base-compat-batteries-0.12.2.tar.gz) = 7ekJLgf5BOB1kWC/Hs0/t+sEO65tyJo3w9yUgp7F65k=
|
||||
SHA256 (hackage/base-orphans-0.8.7.tar.gz) = iI/Wfw2+kyd49bFwkizoDQ3KsWgO6Y8db8w2LyDZ5Ec=
|
||||
SHA256 (hackage/bifunctors-5.5.14.tar.gz) = UwEW0MR83jt2w7m30R8FmRlnOQM/lzMX6HZ3YzRpkmQ=
|
||||
SHA256 (hackage/comonad-5.0.8.tar.gz) = 72zfLMKSzEPuaqlsWBsjX96oq0Sgv/sk3HmuKy7zPRM=
|
||||
SHA256 (hackage/comonad-5.0.8_1.cabal) = Hxqr1z7H+A8gzweKdIpgzUjY5XJ3gC/fapqzYBqbj34=
|
||||
SHA256 (hackage/contravariant-1.5.5.tar.gz) = Bi/WZYDXqtC1upPmRP+n/u5pJ271DyDU7Z8d63ZC3/o=
|
||||
SHA256 (hackage/data-fix-0.3.2.tar.gz) = OhctO8BjnDJzRell+dkCPgmUJYFLKNzbe2D/ZtZiGcw=
|
||||
SHA256 (hackage/data-fix-0.3.2_3.cabal) = veoX9rF8HTJ/U65oBuG8PKeBO0Z0KpPGCIxyg3yK53w=
|
||||
SHA256 (hackage/distributive-0.6.2.1.tar.gz) = 1zUTkuB49YyqRmMKS5xkPh4und3uRYSMXINY57Exa5E=
|
||||
SHA256 (hackage/distributive-0.6.2.1_1.cabal) = D5n1VBzKBKz4m2RDKwNCK2QI6DCo3/MObEM07xpIaAw=
|
||||
SHA256 (hackage/dlist-1.0.tar.gz) = Fz1jcyi7Fz/MNl8w0p/0qUKSoeDlVYrrPfwR3oFRARU=
|
||||
SHA256 (hackage/fgl-5.8.0.0.tar.gz) = 1g7AlHL5usDlSjtVonS1hyrSigSNUjDgBqKMWtyLjQk=
|
||||
SHA256 (hackage/generically-0.1.tar.gz) = 1bcogOHQCyS2wiGXjQYL6mIKzEEs3LYlIfMBbL0/K3E=
|
||||
SHA256 (hackage/hashable-1.4.1.0.tar.gz) = 4bMFwoDmatgn7ert1pM7n8QXT2Jogod+qyoINE5mXoc=
|
||||
SHA256 (hackage/indexed-traversable-0.1.2.tar.gz) = UWhY7nGYsf7RuTxmUVf5hV/ZRzedt/EV1IwbDWcOaY0=
|
||||
SHA256 (hackage/indexed-traversable-0.1.2_2.cabal) = UqG3CKvZIfkaWXf2rlPEqisz98ML4P/xcXP2WLNMU1A=
|
||||
SHA256 (hackage/indexed-traversable-instances-0.1.1.1.tar.gz) = iV7lBj1Z4rWJMMpvpUiFuxHxnIt8e6bHsBT5QxzcwLA=
|
||||
SHA256 (hackage/integer-logarithms-1.0.3.1.tar.gz) = mwqfn6tgmxXNAVhlch+wX3RKG8d66S/RM4ct5Si76n8=
|
||||
SHA256 (hackage/integer-logarithms-1.0.3.1_3.cabal) = 1Zv9HTmAghevK2h4nTwOV8txmdR0BaJ2Bg2I/vT0AX0=
|
||||
SHA256 (hackage/primitive-0.7.4.0.tar.gz) = Wy1twoEusvahFfBfy+PnI9Ou/3iUsBLGF+B1EwWBrdU=
|
||||
SHA256 (hackage/random-1.2.1.1.tar.gz) = PhJy9+1qTXvRcSuQFD7DJv7psiV4kiI3n+ogqckMm3Y=
|
||||
SHA256 (hackage/regex-base-0.94.0.2.tar.gz) = e5lAj1gPW7Z6HEE+C8c1iGYIJRMxrTYyICDyFprqLvE=
|
||||
SHA256 (hackage/regex-base-0.94.0.2_1.cabal) = T/RCXHEM3fRA37rGzVIxC7ayPheQI5D/ccn8fqr8T8w=
|
||||
SHA256 (hackage/regex-tdfa-1.3.2.tar.gz) = JmDX3F8AcYw5RUyETTVN6ibWBduYZPgJUe+tX3KE39E=
|
||||
SHA256 (hackage/scientific-0.3.7.0.tar.gz) = o6EhxLPWj7i5+McJqwEuSPCQ7VU2CSR6gFrQcNazQ6k=
|
||||
SHA256 (hackage/scientific-0.3.7.0_3.cabal) = UXREyUTa2duCNdezEde5oIOaUZ7jF4KItalgYlbgx9g=
|
||||
SHA256 (hackage/semialign-1.2.0.1.tar.gz) = 2QBpcEGuSwzKMkMnOis+gLz3TZN0Bdal/zTcM+6VITI=
|
||||
SHA256 (hackage/semialign-1.2.0.1_3.cabal) = 7jRo40nnLsCmBK4FVzpN5xgdl9EDZiVCRKDMqKdtbDU=
|
||||
SHA256 (hackage/semigroupoids-5.3.7.tar.gz) = bUXNtsWMdcpYiFm4CyyStvSFkKA+Blwkzl12emqWN5k=
|
||||
SHA256 (hackage/splitmix-0.1.0.4.tar.gz) = bQZUAjlOepEXCT27RTCiE0LJseLsUJUWyKjQ/+2Y7Ko=
|
||||
SHA256 (hackage/splitmix-0.1.0.4_1.cabal) = gE4ldLx+MtCMurkeR+5ih7TffVCFHXP553j5Spp4FMc=
|
||||
SHA256 (hackage/strict-0.4.0.1.tar.gz) = 3/arwIrWN+UYkbuLR1d4xAkmxRIZ7aYP1k8NloAiYkE=
|
||||
SHA256 (hackage/strict-0.4.0.1_4.cabal) = 1iBadI6420zRenF5vpcMlFmICXCSlMz6QxWcfzzEv10=
|
||||
SHA256 (hackage/tagged-0.8.6.1.tar.gz) = 9eD8+V8LtKpj9CjywBlVpB6hpCz885FF7WMfWalhbAI=
|
||||
SHA256 (hackage/tagged-0.8.6.1_3.cabal) = iiSu8puONUR8zFZljqB8Kt7TC/qBMOoFfjgpNuF8dKY=
|
||||
SHA256 (hackage/text-short-0.1.5.tar.gz) = o17GzeKtoITBoFDcWIW+WrAfhRuT10TPD6y8HBgALdo=
|
||||
SHA256 (hackage/text-short-0.1.5_1.cabal) = 67dzg3Q+IUE4z5OHh1vH0mZcVYSy5In+FGEkDxnntT4=
|
||||
SHA256 (hackage/th-abstraction-0.4.5.0.tar.gz) = ANXiTyR+MovZiY1a9ZFcHoaxNLTUC6poAlhjX5UDFSY=
|
||||
SHA256 (hackage/these-1.1.1.1.tar.gz) = 15jJ9W4X3vRB6PUeVMwRr9s+dsap0enuFU6aeNoL9Qg=
|
||||
SHA256 (hackage/these-1.1.1.1_6.cabal) = KZHBPiZLDDXGlsj1+FxCjFO8Quk7HfvRmlggUhEtlIo=
|
||||
SHA256 (hackage/time-compat-1.9.6.1.tar.gz) = rQe7AOuWeMITbTaAdSsArMTLxSJlS7MZm/McYe8ea4A=
|
||||
SHA256 (hackage/time-compat-1.9.6.1_4.cabal) = XPX6GdMnQoFvoUIwhcv9YmrvQzEBwLl78Oj3IKbzadg=
|
||||
SHA256 (hackage/transformers-compat-0.7.2.tar.gz) = tixzBMnzy8lGPQc5qoXLlInyF+oJK51iXUF1FPvMnWo=
|
||||
SHA256 (hackage/unordered-containers-0.2.19.1.tar.gz) = Gye+xeDVIrJ6YCnr9MSm1ArLwIPHhwCOMvtVxLHRKNI=
|
||||
SHA256 (hackage/unordered-containers-0.2.19.1_1.cabal) = 2xEEK7A1bAreonfQeUdDgpEltMmUVa9q8r1fe9Xoijk=
|
||||
SHA256 (hackage/uuid-types-1.0.5.tar.gz) = rWi4m3pkwH3VwlChG+IDPukpMY/1Hse05LVOG03rp90=
|
||||
SHA256 (hackage/uuid-types-1.0.5_3.cabal) = nKdphuOVCvXpCFAr4jc+IpLW3FfsEPWutB19w6GWF4I=
|
||||
SHA256 (hackage/vector-0.13.0.0.tar.gz) = xdMWfRXhL1LgCHnd8wSlkWcqdONpzEe8XH+h1ajRW08=
|
||||
SHA256 (hackage/vector-0.13.0.0_1.cabal) = VFKOlVAXQrmUYsxUOJHyEXfn2zTZYM6OPLslr7FqnIk=
|
||||
SHA256 (hackage/vector-stream-0.1.0.0.tar.gz) = qIghD2Rn8VUJBlNzS+XMkgQGoHIn4NOttZCWcW/bgGw=
|
||||
SHA256 (hackage/vector-stream-0.1.0.0_1.cabal) = CbD43E5Rk2udawR5HwqgP3yXWbX7cUDqyKlGHNoeVaM=
|
||||
SHA256 (hackage/witherable-0.4.2.tar.gz) = eQ0rsnQoNBkXO9iRBEOYYGdalBD3DyGRKXPs2QmLQQQ=
|
||||
SHA256 (hackage/witherable-0.4.2_3.cabal) = zMs2F14IirtCke5QRLjATXGs1cNmNpAtJSD5FQjdS7g=
|
||||
SIZE (hackage/Diff-0.4.1.tar.gz) = 8759
|
||||
SIZE (hackage/OneTuple-0.3.1.tar.gz) = 5148
|
||||
SIZE (hackage/OneTuple-0.3.1_3.cabal) = 2276
|
||||
SIZE (hackage/QuickCheck-2.14.2.tar.gz) = 75246
|
||||
SIZE (hackage/ShellCheck-0.9.0.tar.gz) = 231011
|
||||
SIZE (hackage/StateVar-1.2.2.tar.gz) = 5048
|
||||
SIZE (hackage/aeson-2.1.1.0.tar.gz) = 301830
|
||||
SIZE (hackage/assoc-1.0.2.tar.gz) = 3047
|
||||
SIZE (hackage/assoc-1.0.2_3.cabal) = 1253
|
||||
SIZE (hackage/attoparsec-0.14.4.tar.gz) = 160701
|
||||
SIZE (hackage/attoparsec-0.14.4_2.cabal) = 5811
|
||||
SIZE (hackage/base-compat-0.12.2.tar.gz) = 36393
|
||||
SIZE (hackage/base-compat-batteries-0.12.2.tar.gz) = 17645
|
||||
SIZE (hackage/base-orphans-0.8.7.tar.gz) = 25083
|
||||
SIZE (hackage/bifunctors-5.5.14.tar.gz) = 47657
|
||||
SIZE (hackage/comonad-5.0.8.tar.gz) = 15227
|
||||
SIZE (hackage/comonad-5.0.8_1.cabal) = 3631
|
||||
SIZE (hackage/contravariant-1.5.5.tar.gz) = 13815
|
||||
SIZE (hackage/data-fix-0.3.2.tar.gz) = 5842
|
||||
SIZE (hackage/data-fix-0.3.2_3.cabal) = 1706
|
||||
SIZE (hackage/distributive-0.6.2.1.tar.gz) = 8140
|
||||
SIZE (hackage/distributive-0.6.2.1_1.cabal) = 2996
|
||||
SIZE (hackage/dlist-1.0.tar.gz) = 18667
|
||||
SIZE (hackage/fgl-5.8.0.0.tar.gz) = 56445
|
||||
SIZE (hackage/generically-0.1.tar.gz) = 2572
|
||||
SIZE (hackage/hashable-1.4.1.0.tar.gz) = 25599
|
||||
SIZE (hackage/indexed-traversable-0.1.2.tar.gz) = 8685
|
||||
SIZE (hackage/indexed-traversable-0.1.2_2.cabal) = 2533
|
||||
SIZE (hackage/indexed-traversable-instances-0.1.1.1.tar.gz) = 3751
|
||||
SIZE (hackage/integer-logarithms-1.0.3.1.tar.gz) = 9023
|
||||
SIZE (hackage/integer-logarithms-1.0.3.1_3.cabal) = 3246
|
||||
SIZE (hackage/primitive-0.7.4.0.tar.gz) = 56575
|
||||
SIZE (hackage/random-1.2.1.1.tar.gz) = 47109
|
||||
SIZE (hackage/regex-base-0.94.0.2.tar.gz) = 10488
|
||||
SIZE (hackage/regex-base-0.94.0.2_1.cabal) = 2643
|
||||
SIZE (hackage/regex-tdfa-1.3.2.tar.gz) = 82839
|
||||
SIZE (hackage/scientific-0.3.7.0.tar.gz) = 24723
|
||||
SIZE (hackage/scientific-0.3.7.0_3.cabal) = 4840
|
||||
SIZE (hackage/semialign-1.2.0.1.tar.gz) = 10371
|
||||
SIZE (hackage/semialign-1.2.0.1_3.cabal) = 2852
|
||||
SIZE (hackage/semigroupoids-5.3.7.tar.gz) = 35349
|
||||
SIZE (hackage/splitmix-0.1.0.4.tar.gz) = 22382
|
||||
SIZE (hackage/splitmix-0.1.0.4_1.cabal) = 6521
|
||||
SIZE (hackage/strict-0.4.0.1.tar.gz) = 12488
|
||||
SIZE (hackage/strict-0.4.0.1_4.cabal) = 4187
|
||||
SIZE (hackage/tagged-0.8.6.1.tar.gz) = 9842
|
||||
SIZE (hackage/tagged-0.8.6.1_3.cabal) = 2874
|
||||
SIZE (hackage/text-short-0.1.5.tar.gz) = 25113
|
||||
SIZE (hackage/text-short-0.1.5_1.cabal) = 3161
|
||||
SIZE (hackage/th-abstraction-0.4.5.0.tar.gz) = 39515
|
||||
SIZE (hackage/these-1.1.1.1.tar.gz) = 9804
|
||||
SIZE (hackage/these-1.1.1.1_6.cabal) = 2748
|
||||
SIZE (hackage/time-compat-1.9.6.1.tar.gz) = 59964
|
||||
SIZE (hackage/time-compat-1.9.6.1_4.cabal) = 5047
|
||||
SIZE (hackage/transformers-compat-0.7.2.tar.gz) = 46485
|
||||
SIZE (hackage/unordered-containers-0.2.19.1.tar.gz) = 58030
|
||||
SIZE (hackage/unordered-containers-0.2.19.1_1.cabal) = 3797
|
||||
SIZE (hackage/uuid-types-1.0.5.tar.gz) = 11922
|
||||
SIZE (hackage/uuid-types-1.0.5_3.cabal) = 2622
|
||||
SIZE (hackage/vector-0.13.0.0.tar.gz) = 154509
|
||||
SIZE (hackage/vector-0.13.0.0_1.cabal) = 9112
|
||||
SIZE (hackage/vector-stream-0.1.0.0.tar.gz) = 12377
|
||||
SIZE (hackage/vector-stream-0.1.0.0_1.cabal) = 1404
|
||||
SIZE (hackage/witherable-0.4.2.tar.gz) = 11876
|
||||
SIZE (hackage/witherable-0.4.2_3.cabal) = 2294
|
482
devel/shellcheck/files/shellcheck.1
Normal file
482
devel/shellcheck/files/shellcheck.1
Normal file
|
@ -0,0 +1,482 @@
|
|||
.\" Automatically generated by Pandoc 2.19.2
|
||||
.\"
|
||||
.\" Define V font for inline verbatim, using C font in formats
|
||||
.\" that render this, and otherwise B font.
|
||||
.ie "\f[CB]x\f[]"x" \{\
|
||||
. ftr V B
|
||||
. ftr VI BI
|
||||
. ftr VB B
|
||||
. ftr VBI BI
|
||||
.\}
|
||||
.el \{\
|
||||
. ftr V CR
|
||||
. ftr VI CI
|
||||
. ftr VB CB
|
||||
. ftr VBI CBI
|
||||
.\}
|
||||
.TH "SHELLCHECK" "1" "" "Shell script analysis tool" ""
|
||||
.hy
|
||||
.SH NAME
|
||||
.PP
|
||||
shellcheck - Shell script analysis tool
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
\f[B]shellcheck\f[R] [\f[I]OPTIONS\f[R]...]
|
||||
\f[I]FILES\f[R]...
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
ShellCheck is a static analysis and linting tool for sh/bash scripts.
|
||||
It\[aq]s mainly focused on handling typical beginner and intermediate
|
||||
level syntax errors and pitfalls where the shell just gives a cryptic
|
||||
error message or strange behavior, but it also reports on a few more
|
||||
advanced issues where corner cases can cause delayed failures.
|
||||
.PP
|
||||
ShellCheck gives shell specific advice.
|
||||
Consider this line:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
(( area = 3.14*r*r ))
|
||||
\f[R]
|
||||
.fi
|
||||
.IP \[bu] 2
|
||||
For scripts starting with \f[V]#!/bin/sh\f[R] (or when using
|
||||
\f[V]-s sh\f[R]), ShellCheck will warn that \f[V](( .. ))\f[R] is not
|
||||
POSIX compliant (similar to checkbashisms).
|
||||
.IP \[bu] 2
|
||||
For scripts starting with \f[V]#!/bin/bash\f[R] (or using
|
||||
\f[V]-s bash\f[R]), ShellCheck will warn that decimals are not
|
||||
supported.
|
||||
.IP \[bu] 2
|
||||
For scripts starting with \f[V]#!/bin/ksh\f[R] (or using
|
||||
\f[V]-s ksh\f[R]), ShellCheck will not warn at all, as \f[V]ksh\f[R]
|
||||
supports decimals in arithmetic contexts.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\f[B]-a\f[R],\ \f[B]--check-sourced\f[R]
|
||||
Emit warnings in sourced files.
|
||||
Normally, \f[V]shellcheck\f[R] will only warn about issues in the
|
||||
specified files.
|
||||
With this option, any issues in sourced files will also be reported.
|
||||
.TP
|
||||
\f[B]-C\f[R][\f[I]WHEN\f[R]],\ \f[B]--color\f[R][=\f[I]WHEN\f[R]]
|
||||
For TTY output, enable colors \f[I]always\f[R], \f[I]never\f[R] or
|
||||
\f[I]auto\f[R].
|
||||
The default is \f[I]auto\f[R].
|
||||
\f[B]--color\f[R] without an argument is equivalent to
|
||||
\f[B]--color=always\f[R].
|
||||
.TP
|
||||
\f[B]-i\f[R]\ \f[I]CODE1\f[R][,\f[I]CODE2\f[R]...],\ \f[B]--include=\f[R]\f[I]CODE1\f[R][,\f[I]CODE2\f[R]...]
|
||||
Explicitly include only the specified codes in the report.
|
||||
Subsequent \f[B]-i\f[R] options are cumulative, but all the codes can be
|
||||
specified at once, comma-separated as a single argument.
|
||||
Include options override any provided exclude options.
|
||||
.TP
|
||||
\f[B]-e\f[R]\ \f[I]CODE1\f[R][,\f[I]CODE2\f[R]...],\ \f[B]--exclude=\f[R]\f[I]CODE1\f[R][,\f[I]CODE2\f[R]...]
|
||||
Explicitly exclude the specified codes from the report.
|
||||
Subsequent \f[B]-e\f[R] options are cumulative, but all the codes can be
|
||||
specified at once, comma-separated as a single argument.
|
||||
.TP
|
||||
\f[B]-f\f[R] \f[I]FORMAT\f[R], \f[B]--format=\f[R]\f[I]FORMAT\f[R]
|
||||
Specify the output format of shellcheck, which prints its results in the
|
||||
standard output.
|
||||
Subsequent \f[B]-f\f[R] options are ignored, see \f[B]FORMATS\f[R] below
|
||||
for more information.
|
||||
.TP
|
||||
\f[B]--list-optional\f[R]
|
||||
Output a list of known optional checks.
|
||||
These can be enabled with \f[B]-o\f[R] flags or \f[B]enable\f[R]
|
||||
directives.
|
||||
.TP
|
||||
\f[B]--norc\f[R]
|
||||
Don\[aq]t try to look for .shellcheckrc configuration files.
|
||||
.TP
|
||||
\f[B]-o\f[R]\ \f[I]NAME1\f[R][,\f[I]NAME2\f[R]...],\ \f[B]--enable=\f[R]\f[I]NAME1\f[R][,\f[I]NAME2\f[R]...]
|
||||
Enable optional checks.
|
||||
The special name \f[I]all\f[R] enables all of them.
|
||||
Subsequent \f[B]-o\f[R] options accumulate.
|
||||
This is equivalent to specifying \f[B]enable\f[R] directives.
|
||||
.TP
|
||||
\f[B]-P\f[R]\ \f[I]SOURCEPATH\f[R],\ \f[B]--source-path=\f[R]\f[I]SOURCEPATH\f[R]
|
||||
Specify paths to search for sourced files, separated by \f[V]:\f[R] on
|
||||
Unix and \f[V];\f[R] on Windows.
|
||||
This is equivalent to specifying \f[V]search-path\f[R] directives.
|
||||
.TP
|
||||
\f[B]-s\f[R]\ \f[I]shell\f[R],\ \f[B]--shell=\f[R]\f[I]shell\f[R]
|
||||
Specify Bourne shell dialect.
|
||||
Valid values are \f[I]sh\f[R], \f[I]bash\f[R], \f[I]dash\f[R] and
|
||||
\f[I]ksh\f[R].
|
||||
The default is to deduce the shell from the file\[aq]s \f[V]shell\f[R]
|
||||
directive, shebang, or \f[V].bash/.bats/.dash/.ksh\f[R] extension, in
|
||||
that order.
|
||||
\f[I]sh\f[R] refers to POSIX \f[V]sh\f[R] (not the system\[aq]s), and
|
||||
will warn of portability issues.
|
||||
.TP
|
||||
\f[B]-S\f[R]\ \f[I]SEVERITY\f[R],\ \f[B]--severity=\f[R]\f[I]severity\f[R]
|
||||
Specify minimum severity of errors to consider.
|
||||
Valid values in order of severity are \f[I]error\f[R],
|
||||
\f[I]warning\f[R], \f[I]info\f[R] and \f[I]style\f[R].
|
||||
The default is \f[I]style\f[R].
|
||||
.TP
|
||||
\f[B]-V\f[R],\ \f[B]--version\f[R]
|
||||
Print version information and exit.
|
||||
.TP
|
||||
\f[B]-W\f[R] \f[I]NUM\f[R],\ \f[B]--wiki-link-count=NUM\f[R]
|
||||
For TTY output, show \f[I]NUM\f[R] wiki links to more information about
|
||||
mentioned warnings.
|
||||
Set to 0 to disable them entirely.
|
||||
.TP
|
||||
\f[B]-x\f[R],\ \f[B]--external-sources\f[R]
|
||||
Follow \f[V]source\f[R] statements even when the file is not specified
|
||||
as input.
|
||||
By default, \f[V]shellcheck\f[R] will only follow files specified on the
|
||||
command line (plus \f[V]/dev/null\f[R]).
|
||||
This option allows following any file the script may \f[V]source\f[R].
|
||||
.RS
|
||||
.PP
|
||||
This option may also be enabled using \f[V]external-sources=true\f[R] in
|
||||
\f[V].shellcheckrc\f[R].
|
||||
This flag takes precedence.
|
||||
.RE
|
||||
.TP
|
||||
\f[B]FILES...\f[R]
|
||||
One or more script files to check, or \[dq]-\[dq] for standard input.
|
||||
.SH FORMATS
|
||||
.TP
|
||||
\f[B]tty\f[R]
|
||||
Plain text, human readable output.
|
||||
This is the default.
|
||||
.TP
|
||||
\f[B]gcc\f[R]
|
||||
GCC compatible output.
|
||||
Useful for editors that support compiling and showing syntax errors.
|
||||
.RS
|
||||
.PP
|
||||
For example, in Vim,
|
||||
\f[V]:set makeprg=shellcheck\[rs] -f\[rs] gcc\[rs] %\f[R] will allow
|
||||
using \f[V]:make\f[R] to check the script, and \f[V]:cnext\f[R] to jump
|
||||
to the next error.
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
<file>:<line>:<column>: <type>: <message>
|
||||
\f[R]
|
||||
.fi
|
||||
.RE
|
||||
.TP
|
||||
\f[B]checkstyle\f[R]
|
||||
Checkstyle compatible XML output.
|
||||
Supported directly or through plugins by many IDEs and build monitoring
|
||||
systems.
|
||||
.RS
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
<?xml version=\[aq]1.0\[aq] encoding=\[aq]UTF-8\[aq]?>
|
||||
<checkstyle version=\[aq]4.3\[aq]>
|
||||
<file name=\[aq]file\[aq]>
|
||||
<error
|
||||
line=\[aq]line\[aq]
|
||||
column=\[aq]column\[aq]
|
||||
severity=\[aq]severity\[aq]
|
||||
message=\[aq]message\[aq]
|
||||
source=\[aq]ShellCheck.SC####\[aq] />
|
||||
...
|
||||
</file>
|
||||
...
|
||||
</checkstyle>
|
||||
\f[R]
|
||||
.fi
|
||||
.RE
|
||||
.TP
|
||||
\f[B]diff\f[R]
|
||||
Auto-fixes in unified diff format.
|
||||
Can be piped to \f[V]git apply\f[R] or \f[V]patch -p1\f[R] to
|
||||
automatically apply fixes.
|
||||
.RS
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
--- a/test.sh
|
||||
+++ b/test.sh
|
||||
\[at]\[at] -2,6 +2,6 \[at]\[at]
|
||||
## Example of a broken script.
|
||||
for f in $(ls *.m3u)
|
||||
do
|
||||
- grep -qi hq.*mp3 $f \[rs]
|
||||
+ grep -qi hq.*mp3 \[dq]$f\[dq] \[rs]
|
||||
&& echo -e \[aq]Playlist $f contains a HQ file in mp3 format\[aq]
|
||||
done
|
||||
\f[R]
|
||||
.fi
|
||||
.RE
|
||||
.TP
|
||||
\f[B]json1\f[R]
|
||||
Json is a popular serialization format that is more suitable for web
|
||||
applications.
|
||||
ShellCheck\[aq]s json is compact and contains only the bare minimum.
|
||||
Tabs are counted as 1 character.
|
||||
.RS
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
{
|
||||
comments: [
|
||||
{
|
||||
\[dq]file\[dq]: \[dq]filename\[dq],
|
||||
\[dq]line\[dq]: lineNumber,
|
||||
\[dq]column\[dq]: columnNumber,
|
||||
\[dq]level\[dq]: \[dq]severitylevel\[dq],
|
||||
\[dq]code\[dq]: errorCode,
|
||||
\[dq]message\[dq]: \[dq]warning message\[dq]
|
||||
},
|
||||
...
|
||||
]
|
||||
}
|
||||
\f[R]
|
||||
.fi
|
||||
.RE
|
||||
.TP
|
||||
\f[B]json\f[R]
|
||||
This is a legacy version of the \f[B]json1\f[R] format.
|
||||
It\[aq]s a raw array of comments, and all offsets have a tab stop of 8.
|
||||
.TP
|
||||
\f[B]quiet\f[R]
|
||||
Suppress all normal output.
|
||||
Exit with zero if no issues are found, otherwise exit with one.
|
||||
Stops processing after the first issue.
|
||||
.SH DIRECTIVES
|
||||
.PP
|
||||
ShellCheck directives can be specified as comments in the shell script.
|
||||
If they appear before the first command, they are considered file-wide.
|
||||
Otherwise, they apply to the immediately following command or block:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
# shellcheck key=value key=value
|
||||
command-or-structure
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
For example, to suppress SC2035 about using \f[V]./*.jpg\f[R]:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
# shellcheck disable=SC2035
|
||||
echo \[dq]Files: \[dq] *.jpg
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
To tell ShellCheck where to look for an otherwise dynamically determined
|
||||
file:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
# shellcheck source=./lib.sh
|
||||
source \[dq]$(find_install_dir)/lib.sh\[dq]
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
Here a shell brace group is used to suppress a warning on multiple
|
||||
lines:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
# shellcheck disable=SC2016
|
||||
{
|
||||
echo \[aq]Modifying $PATH\[aq]
|
||||
echo \[aq]PATH=foo:$PATH\[aq] >> \[ti]/.bashrc
|
||||
}
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
Valid keys are:
|
||||
.TP
|
||||
\f[B]disable\f[R]
|
||||
Disables a comma separated list of error codes for the following
|
||||
command.
|
||||
The command can be a simple command like \f[V]echo foo\f[R], or a
|
||||
compound command like a function definition, subshell block or loop.
|
||||
A range can be be specified with a dash, e.g.
|
||||
\f[V]disable=SC3000-SC4000\f[R] to exclude 3xxx.
|
||||
All warnings can be disabled with \f[V]disable=all\f[R].
|
||||
.TP
|
||||
\f[B]enable\f[R]
|
||||
Enable an optional check by name, as listed with
|
||||
\f[B]--list-optional\f[R].
|
||||
Only file-wide \f[V]enable\f[R] directives are considered.
|
||||
.TP
|
||||
\f[B]external-sources\f[R]
|
||||
Set to \f[V]true\f[R] in \f[V].shellcheckrc\f[R] to always allow
|
||||
ShellCheck to open arbitrary files from \[aq]source\[aq] statements (the
|
||||
way most tools do).
|
||||
.RS
|
||||
.PP
|
||||
This option defaults to \f[V]false\f[R] only due to ShellCheck\[aq]s
|
||||
origin as a remote service for checking untrusted scripts.
|
||||
It can safely be enabled for normal development.
|
||||
.RE
|
||||
.TP
|
||||
\f[B]source\f[R]
|
||||
Overrides the filename included by a \f[V]source\f[R]/\f[V].\f[R]
|
||||
statement.
|
||||
This can be used to tell shellcheck where to look for a file whose name
|
||||
is determined at runtime, or to skip a source by telling it to use
|
||||
\f[V]/dev/null\f[R].
|
||||
.TP
|
||||
\f[B]source-path\f[R]
|
||||
Add a directory to the search path for \f[V]source\f[R]/\f[V].\f[R]
|
||||
statements (by default, only ShellCheck\[aq]s working directory is
|
||||
included).
|
||||
Absolute paths will also be rooted in these paths.
|
||||
The special path \f[V]SCRIPTDIR\f[R] can be used to specify the
|
||||
currently checked script\[aq]s directory, as in
|
||||
\f[V]source-path=SCRIPTDIR\f[R] or
|
||||
\f[V]source-path=SCRIPTDIR/../libs\f[R].
|
||||
Multiple paths accumulate, and \f[V]-P\f[R] takes precedence over them.
|
||||
.TP
|
||||
\f[B]shell\f[R]
|
||||
Overrides the shell detected from the shebang.
|
||||
This is useful for files meant to be included (and thus lacking a
|
||||
shebang), or possibly as a more targeted alternative to
|
||||
\[aq]disable=SC2039\[aq].
|
||||
.SH RC FILES
|
||||
.PP
|
||||
Unless \f[V]--norc\f[R] is used, ShellCheck will look for a file
|
||||
\f[V].shellcheckrc\f[R] or \f[V]shellcheckrc\f[R] in the script\[aq]s
|
||||
directory and each parent directory.
|
||||
If found, it will read \f[V]key=value\f[R] pairs from it and treat them
|
||||
as file-wide directives.
|
||||
.PP
|
||||
Here is an example \f[V].shellcheckrc\f[R]:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
# Look for \[aq]source\[aq]d files relative to the checked script,
|
||||
# and also look for absolute paths in /mnt/chroot
|
||||
source-path=SCRIPTDIR
|
||||
source-path=/mnt/chroot
|
||||
|
||||
# Since 0.9.0, values can be quoted with \[aq]\[aq] or \[dq]\[dq] to allow spaces
|
||||
source-path=\[dq]My Documents/scripts\[dq]
|
||||
|
||||
# Allow opening any \[aq]source\[aq]d file, even if not specified as input
|
||||
external-sources=true
|
||||
|
||||
# Turn on warnings for unquoted variables with safe values
|
||||
enable=quote-safe-variables
|
||||
|
||||
# Turn on warnings for unassigned uppercase variables
|
||||
enable=check-unassigned-uppercase
|
||||
|
||||
# Allow [ ! -z foo ] instead of suggesting -n
|
||||
disable=SC2236
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
If no \f[V].shellcheckrc\f[R] is found in any of the parent directories,
|
||||
ShellCheck will look in \f[V]\[ti]/.shellcheckrc\f[R] followed by the
|
||||
XDG config directory (usually \f[V]\[ti]/.config/shellcheckrc\f[R]) on
|
||||
Unix, or \f[V]%APPDATA%/shellcheckrc\f[R] on Windows.
|
||||
Only the first file found will be used.
|
||||
.PP
|
||||
Note for Snap users: the Snap sandbox disallows access to hidden files.
|
||||
Use \f[V]shellcheckrc\f[R] without the dot instead.
|
||||
.PP
|
||||
Note for Docker users: ShellCheck will only be able to look for files
|
||||
that are mounted in the container, so \f[V]\[ti]/.shellcheckrc\f[R] will
|
||||
not be read.
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.PP
|
||||
The environment variable \f[V]SHELLCHECK_OPTS\f[R] can be set with
|
||||
default flags:
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
export SHELLCHECK_OPTS=\[aq]--shell=bash --exclude=SC2016\[aq]
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
Its value will be split on spaces and prepended to the command line on
|
||||
each invocation.
|
||||
.SH RETURN VALUES
|
||||
.PP
|
||||
ShellCheck uses the following exit codes:
|
||||
.IP \[bu] 2
|
||||
0: All files successfully scanned with no issues.
|
||||
.IP \[bu] 2
|
||||
1: All files successfully scanned with some issues.
|
||||
.IP \[bu] 2
|
||||
2: Some files could not be processed (e.g.
|
||||
file not found).
|
||||
.IP \[bu] 2
|
||||
3: ShellCheck was invoked with bad syntax (e.g.
|
||||
unknown flag).
|
||||
.IP \[bu] 2
|
||||
4: ShellCheck was invoked with bad options (e.g.
|
||||
unknown formatter).
|
||||
.SH LOCALE
|
||||
.PP
|
||||
This version of ShellCheck is only available in English.
|
||||
All files are leniently decoded as UTF-8, with a fallback of ISO-8859-1
|
||||
for invalid sequences.
|
||||
\f[V]LC_CTYPE\f[R] is respected for output, and defaults to UTF-8 for
|
||||
locales where encoding is unspecified (such as the \f[V]C\f[R] locale).
|
||||
.PP
|
||||
Windows users seeing
|
||||
\f[V]commitBuffer: invalid argument (invalid character)\f[R] should set
|
||||
their terminal to use UTF-8 with \f[V]chcp 65001\f[R].
|
||||
.SH KNOWN INCOMPATIBILITIES
|
||||
.PP
|
||||
(If nothing in this section makes sense, you are unlikely to be affected
|
||||
by it)
|
||||
.PP
|
||||
To avoid confusing and misguided suggestions, ShellCheck requires
|
||||
function bodies to be either \f[V]{ brace groups; }\f[R] or
|
||||
\f[V]( subshells )\f[R], and function names containing \f[V][]*=!\f[R]
|
||||
are only recognized after a \f[V]function\f[R] keyword.
|
||||
.PP
|
||||
The following unconventional function definitions are identical in Bash,
|
||||
but ShellCheck only recognizes the latter.
|
||||
.IP
|
||||
.nf
|
||||
\f[C]
|
||||
[x!=y] () [[ $1 ]]
|
||||
function [x!=y] () { [[ $1 ]]; }
|
||||
\f[R]
|
||||
.fi
|
||||
.PP
|
||||
Shells without the \f[V]function\f[R] keyword do not allow these
|
||||
characters in function names to begin with.
|
||||
Function names containing \f[V]{}\f[R] are not supported at all.
|
||||
.PP
|
||||
Further, if ShellCheck sees \f[V][x!=y]\f[R] it will assume this is an
|
||||
invalid comparison.
|
||||
To invoke the above function, quote the command as in
|
||||
\f[V]\[aq][x!=y]\[aq]\f[R], or to retain the same globbing behavior, use
|
||||
\f[V]command [x!=y]\f[R].
|
||||
.PP
|
||||
ShellCheck imposes additional restrictions on the \f[V][\f[R] command to
|
||||
help diagnose common invalid uses.
|
||||
While \f[V][ $x= 1 ]\f[R] is defined in POSIX, ShellCheck will assume it
|
||||
was intended as the much more likely comparison
|
||||
\f[V][ \[dq]$x\[dq] = 1 ]\f[R] and fail accordingly.
|
||||
For unconventional or dynamic uses of the \f[V][\f[R] command, use
|
||||
\f[V]test\f[R] or \f[V]\[rs][\f[R] instead.
|
||||
.SH REPORTING BUGS
|
||||
.PP
|
||||
Bugs and issues can be reported on GitHub:
|
||||
.PP
|
||||
https://github.com/koalaman/shellcheck/issues
|
||||
.SH AUTHORS
|
||||
.PP
|
||||
ShellCheck is developed and maintained by Vidar Holen, with assistance
|
||||
from a long list of wonderful contributors.
|
||||
.SH COPYRIGHT
|
||||
.PP
|
||||
Copyright 2012-2022, Vidar Holen and contributors.
|
||||
Licensed under the GNU General Public License version 3 or later, see
|
||||
https://gnu.org/licenses/gpl.html
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
sh(1) bash(1)
|
11
devel/shellcheck/pkg/DESCR
Normal file
11
devel/shellcheck/pkg/DESCR
Normal file
|
@ -0,0 +1,11 @@
|
|||
ShellCheck is a shell script static analysis tool. The goals of
|
||||
ShellCheck are:
|
||||
|
||||
* To point out and clarify typical beginner's syntax issues, that
|
||||
causes a shell to give cryptic error messages.
|
||||
* To point out and clarify typical intermediate level semantic
|
||||
problems, that causes a shell to behave strangely and
|
||||
counter-intuitively.
|
||||
* To point out subtle caveats, corner cases and pitfalls, that may
|
||||
cause an advanced user's otherwise working script to fail under
|
||||
future circumstances.
|
3
devel/shellcheck/pkg/PLIST
Normal file
3
devel/shellcheck/pkg/PLIST
Normal file
|
@ -0,0 +1,3 @@
|
|||
@pkgpath devel/shellcheck,-main
|
||||
@bin bin/shellcheck
|
||||
@man man/man1/shellcheck.1
|
Loading…
Add table
Add a link
Reference in a new issue