summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2021-05-11 10:37:31 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2021-05-11 10:43:34 +0100
commitf46e0833eaf6b4397096b068b7f21ef794084738 (patch)
treefe4efb61e63f0dfb35099aa75c01d27476b28142 /dev-util/shellcheck
parentx11-terms/terminology: add python-3.10 support (diff)
downloadgentoo-f46e0833eaf6b4397096b068b7f21ef794084738.tar.gz
gentoo-f46e0833eaf6b4397096b068b7f21ef794084738.tar.bz2
gentoo-f46e0833eaf6b4397096b068b7f21ef794084738.zip
dev-util/shellcheck: backport haddock markup fix
Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-util/shellcheck')
-rw-r--r--dev-util/shellcheck/files/shellcheck-0.7.2-haddock.patch53
-rw-r--r--dev-util/shellcheck/shellcheck-0.7.2.ebuild2
2 files changed, 55 insertions, 0 deletions
diff --git a/dev-util/shellcheck/files/shellcheck-0.7.2-haddock.patch b/dev-util/shellcheck/files/shellcheck-0.7.2-haddock.patch
new file mode 100644
index 000000000000..db6297064bad
--- /dev/null
+++ b/dev-util/shellcheck/files/shellcheck-0.7.2-haddock.patch
@@ -0,0 +1,53 @@
+From 9e60b3ea841bcaf48780bfcfc2e44aa6563a62de Mon Sep 17 00:00:00 2001
+From: Vidar Holen <spam@vidarholen.net>
+Date: Thu, 22 Apr 2021 22:17:51 -0700
+Subject: [PATCH] Fix haddock failures (fixes #2216)
+
+---
+ src/ShellCheck/Analytics.hs | 12 ++++++------
+ test/buildtest | 2 ++
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+--- a/src/ShellCheck/Analytics.hs
++++ b/src/ShellCheck/Analytics.hs
+@@ -4155,11 +4155,11 @@ checkEqualsInCommand params originalToken =
+ _ | "===" `isPrefixOf` s -> borderMsg (getId originalToken)
+ _ -> prefixMsg (getId cmd)
+
+- -- $var==42
++ -- '$var==42'
+ _ | "==" `isInfixOf` s ->
+ badComparisonMsg (getId cmd)
+
+- -- ${foo[x]}=42 and $foo=42
++ -- '${foo[x]}=42' and '$foo=42'
+ [T_DollarBraced id braced l] | "=" `isPrefixOf` s -> do
+ let variableStr = concat $ oversimplify l
+ let variableReference = getBracedReference variableStr
+@@ -4172,22 +4172,22 @@ checkEqualsInCommand params originalToken =
+ && "]" `isSuffixOf` variableModifier
+
+ case () of
+- -- $foo=bar should already have caused a parse-time SC1066
++ -- '$foo=bar' should already have caused a parse-time SC1066
+ -- _ | not braced && isPlain ->
+ -- return ()
+
+ _ | variableStr == "" -> -- Don't try to fix ${}=foo
+ genericMsg (getId cmd)
+
+- -- $#=42 or ${#var}=42
++ -- '$#=42' or '${#var}=42'
+ _ | "#" `isPrefixOf` variableStr ->
+ genericMsg (getId cmd)
+
+- -- ${0}=42
++ -- '${0}=42'
+ _ | variableStr == "0" ->
+ assign0Msg id $ fixWith [replaceToken id params "BASH_ARGV0"]
+
+- -- $2=2
++ -- '$2=2'
+ _ | isPositional ->
+ positionalMsg id
+
diff --git a/dev-util/shellcheck/shellcheck-0.7.2.ebuild b/dev-util/shellcheck/shellcheck-0.7.2.ebuild
index f6704b2938fb..012df314142a 100644
--- a/dev-util/shellcheck/shellcheck-0.7.2.ebuild
+++ b/dev-util/shellcheck/shellcheck-0.7.2.ebuild
@@ -31,3 +31,5 @@ RDEPEND="dev-haskell/aeson:=[profile?]
DEPEND="${RDEPEND}
>=dev-haskell/cabal-2.2.0.1
"
+
+PATCHES=("${FILESDIR}"/${P}-haddock.patch)