aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax
diff options
context:
space:
mode:
authorChimrod <>2023-11-04 17:16:16 +0100
committerChimrod <>2023-11-04 17:16:16 +0100
commit6ada3862d96f82e44b3b19dd84d08cbb8c6a6006 (patch)
treee2fa4e223c4ce0f3945af76f9e82e887b307a95b /lib/syntax
parent673da2554d3e667e0a62d5c7bbf30999f1295dc1 (diff)
Allow test to be enabled or disabled by command line
Diffstat (limited to 'lib/syntax')
-rw-r--r--lib/syntax/S.ml6
-rw-r--r--lib/syntax/check.ml1
-rw-r--r--lib/syntax/dead_end.ml1
-rw-r--r--lib/syntax/nested_strings.ml1
-rw-r--r--lib/syntax/tree.ml1
-rw-r--r--lib/syntax/type_of.ml1
6 files changed, 11 insertions, 0 deletions
diff --git a/lib/syntax/S.ml b/lib/syntax/S.ml
index a961738..afb6526 100644
--- a/lib/syntax/S.ml
+++ b/lib/syntax/S.ml
@@ -104,7 +104,13 @@ end
module type Analyzer = sig
val identifier : string
+ (** Identifier for the module *)
+
val description : string
+ (** Short description*)
+
+ val active : bool ref
+ (** Is the test active or not *)
module Expression : Expression
module Instruction : Instruction with type expression = Expression.t'
diff --git a/lib/syntax/check.ml b/lib/syntax/check.ml
index 59eaaf1..c5dfe74 100644
--- a/lib/syntax/check.ml
+++ b/lib/syntax/check.ml
@@ -110,6 +110,7 @@ end
module Make (A : App) = struct
let identifier = "main_checker"
let description = "Internal module"
+ let active = ref false
(* Global variable for the whole module *)
let len = Array.length A.t
diff --git a/lib/syntax/dead_end.ml b/lib/syntax/dead_end.ml
index bb56b2f..98c361e 100644
--- a/lib/syntax/dead_end.ml
+++ b/lib/syntax/dead_end.ml
@@ -2,6 +2,7 @@ open StdLabels
let identifier = "dead_end"
let description = "Check for dead end in the code"
+let active = ref false
module Expression = struct
type t = unit
diff --git a/lib/syntax/nested_strings.ml b/lib/syntax/nested_strings.ml
index 37f352c..16ec4ac 100644
--- a/lib/syntax/nested_strings.ml
+++ b/lib/syntax/nested_strings.ml
@@ -2,6 +2,7 @@ open StdLabels
let identifier = "escaped_string"
let description = "Check for unnecessary use of expression encoded in string"
+let active = ref true
module Expression : S.Expression with type t' = Report.t list = struct
type t = Report.t list
diff --git a/lib/syntax/tree.ml b/lib/syntax/tree.ml
index 8444fd9..6f99bbd 100644
--- a/lib/syntax/tree.ml
+++ b/lib/syntax/tree.ml
@@ -2,6 +2,7 @@ open StdLabels
let identifier = "tree"
let description = "Build the AST"
+let active = ref true
module Ast = struct
type 'a literal = 'a T.literal = Text of string | Expression of 'a list
diff --git a/lib/syntax/type_of.ml b/lib/syntax/type_of.ml
index 224e029..223633c 100644
--- a/lib/syntax/type_of.ml
+++ b/lib/syntax/type_of.ml
@@ -2,6 +2,7 @@ open StdLabels
let identifier = "type_check"
let description = "Ensure all the expression are correctly typed"
+let active = ref true
module Helper = struct
type type_of =