Skip to content

Fix -Wunused-packages in hls-cabal-plugin #3977

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
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 1 addition & 4 deletions plugins/hls-cabal-plugin/hls-cabal-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extra-source-files:
test/testdata/simple-cabal/simple-cabal.cabal

common warnings
ghc-options: -Wall
ghc-options: -Wall -Wunused-packages

library
import: warnings
Expand Down Expand Up @@ -80,15 +80,12 @@ test-suite tests
, base
, bytestring
, Cabal-syntax >= 3.7
, directory
, filepath
, ghcide
, hls-cabal-plugin
, hls-test-utils == 2.6.0.0
, lens
, lsp
, lsp-types
, tasty-hunit
, text
, text-rope
, transformers
Expand Down
2 changes: 1 addition & 1 deletion plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ completion recorder ide _ complParams = do
(Just cnts, Just path) -> do
pref <- VFS.getCompletionPrefix position cnts
let res = result pref path cnts
liftIO $ fmap (InL) res
liftIO $ fmap InL res
_ -> pure . InR $ InR Null
where
result :: Maybe VFS.PosPrefixInfo -> FilePath -> VFS.VirtualFile -> IO [CompletionItem]
Expand Down
2 changes: 1 addition & 1 deletion plugins/hls-cabal-plugin/test/Context.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ getContextTests =
, testCase "Cabal version keyword - no value, many spaces" $ do
-- on a file, where the "cabal-version:" keyword is already written
-- the context should still be top level but the keyword should be recognized
ctx <- callGetContext (Position 0 45) ("") ["cabal-version:" <> T.replicate 50 " "]
ctx <- callGetContext (Position 0 45) "" ["cabal-version:" <> T.replicate 50 " "]
ctx @?= (TopLevel, KeyWord "cabal-version:")
, testCase "Cabal version keyword - keyword partly written" $ do
-- in the first line of the file, if the keyword
Expand Down