Skip to content

Commit ab7f57b

Browse files
committed
Hlint: Comment for isPreferred
Including the rationale for why we're making this decision as a comment in the code.
1 parent d73aaa6 commit ab7f57b

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,8 @@ diagnosticToCodeActions dynFlags fileContents pluginId documentId diagnostic
446446
Nothing
447447
Nothing
448448
= catMaybes
449+
-- Applying the hint is marked preferred because it addresses the underlying error.
450+
-- Disabling the rule isn't, because less often used and configuration can be adapted.
449451
[ if | isHintApplicable
450452
, let applyHintTitle = "Apply hint \"" <> hint <> "\""
451453
applyHintArguments = [toJSON (AOP (documentId ^. LSP.uri) start hint)]

0 commit comments

Comments
 (0)