From b5f5e6347d59be6b26ce8761646fe95ac7b2f3c7 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Tue, 26 Jul 2022 10:42:01 -0700 Subject: [PATCH] Discard next rather than existing fixes when they overlap --- src/ShellCheck/Fixer.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ShellCheck/Fixer.hs b/src/ShellCheck/Fixer.hs index 2376842..43a97ab 100644 --- a/src/ShellCheck/Fixer.hs +++ b/src/ShellCheck/Fixer.hs @@ -87,6 +87,7 @@ instance Ranged Replacement where instance Monoid Fix where mempty = newFix mappend = (<>) + mconcat = foldl mappend mempty -- fold left to right since <> discards right on overlap instance Semigroup Fix where f1 <> f2 =