Skip to content

Commit 3961f46

Browse files
committed
Reparse extensions to remove invalid ones
1 parent 3cb757a commit 3961f46

File tree

1 file changed

+4
-1
lines changed
  • plugins/hls-hlint-plugin/src/Ide/Plugin

1 file changed

+4
-1
lines changed

plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,10 @@ applyHint ide nfp mhint =
380380
writeFileUTF8NoNewLineTranslation temp oldContent
381381
(pflags, _, _) <- runAction' $ useNoFile_ GetHlintSettings
382382
exts <- runAction' $ getExtensions pflags nfp
383-
(Right <$> applyRefactorings Nothing commands temp (map show exts)) `catches`
383+
-- We have to reparse extensions to remove the invalid ones
384+
let (enabled, disabled, _invalid) = parseExtensions $ map show exts
385+
let refactExts = map show $ enabled ++ disabled
386+
(Right <$> applyRefactorings Nothing commands temp refactExts) `catches`
384387
[ Handler $ \e -> return (Left (show (e :: IOException)))
385388
, Handler $ \e -> return (Left (show (e :: ErrorCall)))
386389
]

0 commit comments

Comments
 (0)