I believe this regex for cucumber is not precise enough. Specifically, it was picking up this indentation in an error message from GHC: Main.hs:195:1: error: [GHC-44432] The type signature for ‘apathway’ lacks an accompanying binding Suggested fix: Perhaps use one of these: ‘foo’ (Defined at Main.hs:196:1), ‘foo’ (Defined at Main.hs:216:1) It picked up this as being error messages which I believe it shouldn’t have: ‘foo’ (Defined at Main.hs:216 ‘foo’ (Defined at Main.hs:216 This change just ignores it if there is remaining space. Probably it still needs to be refined, but this at least avoids this false positive for me.