Skip to content

Commit 29f0d8d

Browse files
authored
Merge pull request #3398 from jonathan-conder/master
Fix JSON1 repeated comments across multiple files
2 parents 768b114 + 29422b6 commit 29f0d8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ShellCheck/Formatter/JSON1.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ collectResult ref cr sys = mapM_ f groups
120120
let filename = sourceFile (NE.head group)
121121
result <- siReadFile sys (Just True) filename
122122
let contents = either (const "") id result
123-
let comments' = makeNonVirtual comments contents
123+
let comments' = makeNonVirtual (NE.toList group) contents
124124
deepseq comments' $ modifyIORef ref (\x -> comments' ++ x)
125125

126126
finish ref = do

0 commit comments

Comments
 (0)