Skip to content

Commit

Permalink
Ignore bad semgrep rule (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjambon authored Apr 25, 2024
1 parent 9c365d2 commit 06a937e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/Testo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ let update_id (test : t) =
let internal_full_name = T.recompute_internal_full_name test in
let md5_hex = internal_full_name |> Digest.string |> Digest.to_hex in
assert (String.length md5_hex = 32);
(* nosemgrep: ocamllint-str-first-chars *)
let id = String.sub md5_hex 0 12 in
{ test with id; internal_full_name }

Expand Down Expand Up @@ -293,6 +294,7 @@ let rec remove_trailing_slashes path =
| "\\" -> equal_last_char path '\\'
| _ -> (* are there any platforms with other separators? *) false
then
(* nosemgrep: ocamllint-str-first-chars *)
remove_trailing_slashes (String.sub path 0 (String.length path - 1))
else
path
Expand Down

0 comments on commit 06a937e

Please sign in to comment.