-
-
Notifications
You must be signed in to change notification settings - Fork 390
Fix -Wall and -Wunused-packages in pragmas plugin #3982
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
Fix -Wall and -Wunused-packages in pragmas plugin #3982
Conversation
@@ -176,8 +170,8 @@ mkEdit :: (UInt,UInt) -> (UInt,UInt) -> T.Text -> TextEdit | |||
mkEdit (startLine, startCol) (endLine, endCol) newText = | |||
TextEdit (Range (Position startLine startCol) (Position endLine endCol)) newText | |||
|
|||
completionTest :: String -> FilePath -> T.Text -> T.Text -> Maybe InsertTextFormat -> Maybe T.Text -> Maybe T.Text -> [UInt] -> TestTree | |||
completionTest testComment fileName replacementText expectedLabel expectedFormat expectedInsertText detail [delFromLine, delFromCol, delToLine, delToCol, completeAtLine, completeAtCol] = | |||
completionTest :: String -> FilePath -> T.Text -> T.Text -> Maybe InsertTextFormat -> Maybe T.Text -> Maybe T.Text -> (UInt, UInt, UInt, UInt, UInt, UInt) -> TestTree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find it less evil to use 6-tuple than to disable incomplete-patterns warning just to be able to pass fixed length list 😏
, completionTest "completes language extensions case insensitive" "Completion.hs" "lAnGuaGe Overloaded" "OverloadedStrings" Nothing Nothing Nothing [0, 4, 0, 34, 0, 24] | ||
, completionTest "completes the Strict language extension" "Completion.hs" "Str" "Strict" Nothing Nothing Nothing [0, 13, 0, 31, 0, 16] | ||
, completionTest "completes No- language extensions" "Completion.hs" "NoOverload" "NoOverloadedStrings" Nothing Nothing Nothing [0, 13, 0, 31, 0, 23] | ||
, onlyWorkForGhcVersions (>=GHC92) "GHC2021 flag introduced since ghc9.2" $ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 changes here:
- changing lists of integers to 6-tuples
- removing conditional which is no longer needed now that ghcs < 9.2 are not supported
Sorry, mistakenly closes this PR when cleaning up branches in my fork.. reopening. |
No description provided.