Skip to content

Commit 0079903

Browse files
committed
fix documentation/typos
1 parent 82a0870 commit 0079903

File tree

5 files changed

+13
-23
lines changed

5 files changed

+13
-23
lines changed

plugins/hls-cabal-project-plugin/src/Ide/Plugin/CabalProject.hs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ descriptor :: Recorder (WithPriority Log) -> PluginId -> PluginDescriptor IdeSta
6565
descriptor recorder plId =
6666
(defaultCabalProjectPluginDescriptor plId "Provides a variety of IDE features in cabal.project files")
6767
{ pluginRules = cabalProjectRules recorder plId
68-
, pluginHandlers =
69-
mconcat
70-
[]
7168
, pluginNotificationHandlers =
7269
mconcat
7370
[ mkPluginNotificationHandler LSP.SMethod_TextDocumentDidOpen $
@@ -123,9 +120,9 @@ restartCabalProjectShakeSession shakeExtras vfs file actionMsg actionBetweenSess
123120

124121
cabalProjectRules :: Recorder (WithPriority Log) -> PluginId -> Rules ()
125122
cabalProjectRules recorder plId = do
126-
-- Make sure we initialise the cabal project files-of-interest.
123+
-- Make sure we initialise the cabal.project files-of-interest.
127124
ofInterestRules recorder
128-
-- Rule to produce diagnostics for cabal project files.
125+
-- Rule to produce diagnostics for cabal.project files.
129126
define (cmapWithPrio LogShake recorder) $ \ParseCabalProjectFields file -> do
130127
config <- getPluginConfigAction plId
131128
if not (plcGlobalOn config && plcDiagnosticsOn config)
@@ -175,16 +172,16 @@ cabalProjectRules recorder plId = do
175172
pure (warnDiags, Just projCfg)
176173

177174
action $ do
178-
-- Run the cabal project kick. This code always runs when 'shakeRestart' is run.
175+
-- Run the cabal.project kick. This code always runs when 'shakeRestart' is run.
179176
-- Must be careful to not impede the performance too much. Crucial to
180177
-- a snappy IDE experience.
181178
kick
182179
where
183180
log' = logWith recorder
184181

185-
{- | This is the kick function for the cabal project plugin.
186-
We run this action, whenever we shake session us run/restarted, which triggers
187-
actions to produce diagnostics for cabal project files.
182+
{- | This is the kick function for the cabal.project plugin.
183+
We run this action, whenever a shake session is run/restarted, which triggers
184+
actions to produce diagnostics for cabal.project files.
188185
189186
It is paramount that this kick-function can be run quickly, since it is a blocking
190187
function invocation.
@@ -196,10 +193,10 @@ kick = do
196193

197194

198195
-- ----------------------------------------------------------------
199-
-- Cabal project file of Interest rules and global variable
196+
-- Cabal.project file of Interest rules and global variable
200197
-- ----------------------------------------------------------------
201198

202-
{- | Cabal project files that are currently open in the lsp-client.
199+
{- | Cabal.project files that are currently open in the lsp-client.
203200
Specific actions happen when these files are saved, closed or modified,
204201
such as generating diagnostics, re-parsing, etc...
205202

plugins/hls-cabal-project-plugin/test/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ main :: IO ()
3333
main = do
3434
defaultTestRunner $
3535
testGroup
36-
"Cabal Plugin Tests"
36+
"Cabal.project Plugin Tests"
3737
[ unitTests
3838
, pluginTests
3939
]
@@ -52,7 +52,7 @@ unitTests =
5252
cabalProjectParserUnitTests :: TestTree
5353
cabalProjectParserUnitTests =
5454
testGroup
55-
"Parsing Cabal Project"
55+
"Parsing Cabal.project"
5656
[ testCase "Simple Parsing works" $ do
5757
let fp = testDataDir </> "cabal.project"
5858
bytes <- BS.readFile fp

plugins/hls-cabal-project-plugin/test/Utils.hs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ runCabalProjectGoldenSession title subdir fp act = goldenWithCabalDoc def cabalP
3131
testDataDir :: FilePath
3232
testDataDir = "plugins" </> "hls-cabal-project-plugin" </> "test" </> "testdata"
3333

34-
-- | these functions are used to detect cabal kicks
35-
-- and look at diagnostics for cabal files
34+
-- | these functions are used to detect cabal.project kicks
35+
-- and look at diagnostics for cabal.project files
3636
-- kicks are run everytime there is a shake session run/restart
3737
cabalProjectKickDone :: Session ()
3838
cabalProjectKickDone = kick (Proxy @"kick/done/cabal-project") >>= guard . not . null
@@ -42,7 +42,3 @@ cabalProjectKickStart = kick (Proxy @"kick/start/cabal-project") >>= guard . not
4242

4343
cabalProjectCaptureKick :: Session [Diagnostic]
4444
cabalProjectCaptureKick = captureKickDiagnostics cabalProjectKickStart cabalProjectKickDone
45-
46-
-- | list comparison where the order in the list is irrelevant
47-
(@?==) :: (HasCallStack, Ord a, Show a) => [a] -> [a] -> Assertion
48-
(@?==) l1 l2 = sort l1 @?= sort l2

test.cpp

Lines changed: 0 additions & 3 deletions
This file was deleted.

vendor/cabal

Submodule cabal updated from e8e48a6 to b44fecd

0 commit comments

Comments
 (0)