Skip to content

Commit 65ae9bd

Browse files
committed
Reparse extensions to remove invalid ones
1 parent 3300763 commit 65ae9bd

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
@@ -379,7 +379,10 @@ applyHint ide nfp mhint =
379379
writeFileUTF8NoNewLineTranslation temp oldContent
380380
(pflags, _, _) <- runAction' $ useNoFile_ GetHlintSettings
381381
exts <- runAction' $ getExtensions pflags nfp
382-
(Right <$> applyRefactorings Nothing commands temp (map show exts)) `catches`
382+
-- We have to reparse extensions to remove the invalid ones
383+
let (enabled, disabled, _invalid) = parseExtensions $ map show exts
384+
let refactExts = map show $ enabled ++ disabled
385+
(Right <$> applyRefactorings Nothing commands temp refactExts) `catches`
383386
[ Handler $ \e -> return (Left (show (e :: IOException)))
384387
, Handler $ \e -> return (Left (show (e :: ErrorCall)))
385388
]

0 commit comments

Comments
 (0)