mirror of
https://github.com/koalaman/shellcheck
synced 2025-07-06 04:51:37 -07:00
Correctly discard overlapping fixes in diff output (fixes #2370)
This commit is contained in:
parent
e9784fa9a7
commit
c57e447c89
1 changed files with 1 additions and 2 deletions
|
@ -203,10 +203,9 @@ formatDoc color (DiffDoc name lf regions) =
|
||||||
buildFixMap :: [Fix] -> M.Map String Fix
|
buildFixMap :: [Fix] -> M.Map String Fix
|
||||||
buildFixMap fixes = perFile
|
buildFixMap fixes = perFile
|
||||||
where
|
where
|
||||||
splitFixes = concatMap splitFixByFile fixes
|
splitFixes = splitFixByFile $ mconcat fixes
|
||||||
perFile = groupByMap (posFile . repStartPos . head . fixReplacements) splitFixes
|
perFile = groupByMap (posFile . repStartPos . head . fixReplacements) splitFixes
|
||||||
|
|
||||||
-- There are currently no multi-file fixes, but let's handle it anyways
|
|
||||||
splitFixByFile :: Fix -> [Fix]
|
splitFixByFile :: Fix -> [Fix]
|
||||||
splitFixByFile fix = map makeFix $ groupBy sameFile (fixReplacements fix)
|
splitFixByFile fix = map makeFix $ groupBy sameFile (fixReplacements fix)
|
||||||
where
|
where
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue