Skip to content

Commit

Permalink
Add semgrep rule trace-not-in-tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Aug 31, 2021
1 parent adbc7c9 commit 6ca0ae6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .semgrep/tracing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
rules:
- id: trace-not-in-tracing
patterns:
- pattern-either:
- pattern: Messages.trace
- pattern: Messages.tracel
- pattern: Messages.tracei
- pattern: Messages.tracec
- pattern: Messages.traceu
- pattern: Messages.traceli
- pattern-not-inside: if Messages.tracing then ...
message: trace functions should only be called if tracing is enabled at compile time
languages: [ocaml]
severity: WARNING

0 comments on commit 6ca0ae6

Please sign in to comment.