Skip to content

Commit 29422b6

Browse files
Fix JSON1 repeated comments across multiple files
Previously shellcheck would list all comments for each file. Now it only lists the comments which pertain to the file in question.
1 parent c96748a commit 29422b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)