Skip to content

Commit e07a6fe

Browse files
committed
Ban tracing functions also
1 parent 3ad9318 commit e07a6fe

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

.hlint.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,27 @@
241241
- name: "GHC.Arr.!"
242242
within: []
243243

244+
# Tracing functions
245+
# We ban an explicit list rather than the
246+
# Debug.Trace, because that module also
247+
# includes the eventlog tracing functions,
248+
# which are legitimate to use.
249+
- name:
250+
- Debug.Trace.trace
251+
- Debug.Trace.traceId
252+
- Debug.Trace.traceShow
253+
- Debug.Trace.traceShowId
254+
- Debug.Trace.traceStack
255+
- Debug.Trace.traceIO
256+
- Debug.Trace.traceM
257+
- Debug.Trace.traceShowM
258+
- Debug.Trace.putTraceMsg
259+
within:
260+
- Development.IDE.Core.Compile
261+
- Development.IDE.Graph.Internal.Database
262+
- Development.IDE.GHC.Util
263+
- Wingman.Debug
264+
244265
# We really do not want novel usages of restricted functions, and mere
245266
# Warning is not enough to prevent those consistently; you need a build failure.
246267
- error: {name: Avoid restricted function}

plugins/hls-alternate-number-format-plugin/test/Main.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import Data.Either (rights)
77
import Data.List (find)
88
import Data.Text (Text)
99
import qualified Data.Text as T
10-
import Debug.Trace
1110
import qualified Ide.Plugin.AlternateNumberFormat as AlternateNumberFormat
1211
import qualified Ide.Plugin.Conversion as Conversion
1312
import Language.LSP.Types (toEither)

0 commit comments

Comments
 (0)