Skip to content

Don't suggest disabling type errors #2061

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add a failing test for #2032
  • Loading branch information
anka-213 committed Aug 2, 2021
commit 132a6620b1cbb754f4f0ba95fac8ef3da1ac5538
7 changes: 7 additions & 0 deletions plugins/hls-pragmas-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ codeActionTests =
cas <- map fromAction <$> getAllCodeActions doc
liftIO $ "Disable \"unused-imports\" warnings" `elem` map (^. L.title) cas @? "Contains unused-imports code action"
executeCodeAction $ head cas

, goldenWithPragmas "doesn't suggest disabling type errors" "DeferredTypeErrors" $ \doc -> do

_ <- waitForDiagnosticsFrom doc
cas <- map fromAction <$> getAllCodeActions doc
liftIO $ "Disable \"deferred-type-errors\" warnings" `notElem` map (^. L.title) cas @? "Doesn't contain deferred-type-errors code action"
liftIO $ length cas == 0 @? "Expected no code actions, but got: " <> show cas
]

completionTests :: TestTree
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module DeferredTypeErrors where

foo :: Int
foo = ()
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module DeferredTypeErrors where

foo :: Int
foo = ()