Skip to content

Commit 1245439

Browse files
committed
Comment how hlint diags are recomputed
1 parent d558e9a commit 1245439

File tree

1 file changed

+8
-0
lines changed
  • plugins/hls-hlint-plugin/src/Ide/Plugin

1 file changed

+8
-0
lines changed

plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ instance Binary GetHlintDiagnostics
8787

8888
type instance RuleResult GetHlintDiagnostics = ()
8989

90+
-- | Hlint rules to generate file diagnostics based on hlint hints
91+
-- | This rule is recomputed when:
92+
-- | - The files of interest have changed via `getFilesOfInterest`
93+
-- | - One of those files has been edited via
94+
-- | - `getIdeas` -> `getParsedModule`, if the hls ghc matches the hlint default ghc
95+
-- | - `getIdeas` -> `getFileContents` otherwise (hlint is using ghc-lib)
96+
-- | - The client settings have changed, to honour the `hlintOn` setting, via `getClientConfigAction`
97+
-- | - The hlint specific settings have changed, via `getHlintSettingsRule`
9098
rules :: Rules ()
9199
rules = do
92100
define $ \GetHlintDiagnostics file -> do

0 commit comments

Comments
 (0)