Skip to content

Commit

Permalink
Partially revert "fix: Reduce logspew with Pro Engine (#7128)" (#7130)
Browse files Browse the repository at this point in the history
This reverts commit c038f4b.

Instead demote the severity from "warning" to "trace".
  • Loading branch information
IagoAbal committed Feb 13, 2023
1 parent 4e36ad4 commit 359d258
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/engine/Match_tainting_mode.ml
Original file line number Diff line number Diff line change
Expand Up @@ -242,20 +242,14 @@ let range_of_any any =
* the AST at some point. *)
match Visitor_AST.range_of_any_opt any with
| None ->
(match any with
(* IL.any_of_orig will return `G.Anys []` for `NoOrig`, and there is
* no point in issuing this warning in that case.
* TODO: Perhaps we should avoid the call to `any_in_ranges` in the
* first place? *)
| G.Anys []
(* An enormous amount of logspew with Semgrep Pro Engine happens with this
* case. TODO Figure out why and avoid it? *)
| G.Tk _ ->
()
| _else_ ->
logger#warning
"Cannot compute range, there are no real tokens in this AST: %s"
(G.show_any any));
if any <> G.Anys [] then
logger#trace
"Cannot compute range, there are no real tokens in this AST: %s"
(G.show_any any);
None
| Some (tok1, tok2) ->
let r = Range.range_of_token_locations tok1 tok2 in
Expand Down

0 comments on commit 359d258

Please sign in to comment.