From 4a27c9a8d50996438ff4853206be674e28069386 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Tue, 26 Jul 2022 15:33:25 -0700 Subject: [PATCH] Fix overlap check --- src/ShellCheck/Fixer.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ShellCheck/Fixer.hs b/src/ShellCheck/Fixer.hs index 43a97ab..358dec9 100644 --- a/src/ShellCheck/Fixer.hs +++ b/src/ShellCheck/Fixer.hs @@ -36,7 +36,7 @@ class Ranged a where end :: a -> Position overlap :: a -> a -> Bool overlap x y = - (yStart >= xStart && yStart < xEnd) || (yStart < xStart && yEnd > xStart) + xEnd > yStart && yEnd > xStart where yStart = start y yEnd = end y