aboutsummaryrefslogtreecommitdiff
path: root/lib/checks/dynamics.ml
diff options
context:
space:
mode:
authorChimrod <>2025-07-19 11:18:24 +0200
committerChimrod <>2025-08-01 14:12:14 +0200
commit3046fb0d0c1ceac2c6a6ca9456e9e05671e0cef9 (patch)
tree8ba2700e541a6753499ceac54ced4f1d02a3b625 /lib/checks/dynamics.ml
parent406b7b79cd375b071f92ddee9cee14a98dc91281 (diff)
Added dependencies system between the modules in the checksHEADmaster
Diffstat (limited to 'lib/checks/dynamics.ml')
-rw-r--r--lib/checks/dynamics.ml19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/checks/dynamics.ml b/lib/checks/dynamics.ml
index 0c16ff8..f88550b 100644
--- a/lib/checks/dynamics.ml
+++ b/lib/checks/dynamics.ml
@@ -7,7 +7,9 @@ let identifier = "dynamics"
let description = "Report all dynamics string in the module"
let is_global = true
let active = ref false
+let depends = []
+type ex = Qsp_syntax.Identifier.t
type text = { content : string; position : S.pos } [@@deriving eq, ord]
module StringSet = Set.Make (struct
@@ -54,8 +56,10 @@ module Expression = struct
let v : t -> t' = Fun.id
(** Only keep the raw strings *)
- let literal : S.pos -> t T.literal list -> t =
- fun position content ->
+ let literal :
+ ctx:Qsp_syntax.S.extract_context -> S.pos -> t T.literal list -> t =
+ fun ~ctx position content ->
+ ignore ctx;
ignore position;
match content with
| [ T.Text content ] -> Text { content; position }
@@ -91,13 +95,16 @@ module Expression = struct
(** Consider the integer as text. This is easier for evaluating the indices in
the arrays (it use the same code as text indices), and will report bad use
of dynamics. *)
- let integer : S.pos -> string -> t =
- fun position content -> Text { content; position }
+ let integer : ctx:Qsp_syntax.S.extract_context -> S.pos -> string -> t =
+ fun ~ctx position content ->
+ ignore ctx;
+ Text { content; position }
(** If the identifier uses any unmanaged expression in the indices, ignore it.
*)
- let ident : (S.pos, t) S.variable -> t =
- fun ({ index; _ } as ident) ->
+ let ident : ctx:Qsp_syntax.S.extract_context -> (S.pos, t) S.variable -> t =
+ fun ~ctx ({ index; _ } as ident) ->
+ ignore ctx;
let is_valid =
Option.fold ~none:true index ~some:(fun opt ->
match opt with None -> false | _ -> true)