Skip to content

Commit

Permalink
Ban tracing functions also
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpj committed Jun 29, 2022
1 parent 3ad9318 commit e07a6fe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .hlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,27 @@
- name: "GHC.Arr.!"
within: []

# Tracing functions
# We ban an explicit list rather than the
# Debug.Trace, because that module also
# includes the eventlog tracing functions,
# which are legitimate to use.
- name:
- Debug.Trace.trace
- Debug.Trace.traceId
- Debug.Trace.traceShow
- Debug.Trace.traceShowId
- Debug.Trace.traceStack
- Debug.Trace.traceIO
- Debug.Trace.traceM
- Debug.Trace.traceShowM
- Debug.Trace.putTraceMsg
within:
- Development.IDE.Core.Compile
- Development.IDE.Graph.Internal.Database
- Development.IDE.GHC.Util
- Wingman.Debug

# We really do not want novel usages of restricted functions, and mere
# Warning is not enough to prevent those consistently; you need a build failure.
- error: {name: Avoid restricted function}
1 change: 0 additions & 1 deletion plugins/hls-alternate-number-format-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Data.Either (rights)
import Data.List (find)
import Data.Text (Text)
import qualified Data.Text as T
import Debug.Trace
import qualified Ide.Plugin.AlternateNumberFormat as AlternateNumberFormat
import qualified Ide.Plugin.Conversion as Conversion
import Language.LSP.Types (toEither)
Expand Down

0 comments on commit e07a6fe

Please sign in to comment.