add upstream patch for comments breaking haddock
This commit is contained in:
parent
a560341ba2
commit
10126a925a
55
9e60b3ea841bcaf48780bfcfc2e44aa6563a62de.patch
Normal file
55
9e60b3ea841bcaf48780bfcfc2e44aa6563a62de.patch
Normal file
@ -0,0 +1,55 @@
|
||||
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(-)
|
||||
|
||||
diff --git a/src/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs
|
||||
index b53aee1e..b943cbcf 100644
|
||||
--- 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
|
||||
|
@ -17,6 +17,8 @@ Url: https://www.shellcheck.net/
|
||||
# Begin cabal-rpm sources:
|
||||
Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz
|
||||
# End cabal-rpm sources
|
||||
# https://github.com/koalaman/shellcheck/issues/2216
|
||||
Patch0: https://github.com/koalaman/shellcheck/commit/9e60b3ea841bcaf48780bfcfc2e44aa6563a62de.patch
|
||||
|
||||
# Begin cabal-rpm deps:
|
||||
BuildRequires: ghc-Cabal-devel
|
||||
|
Loading…
Reference in New Issue
Block a user