; Library defining mostly Rule.ml and a few related modules.
;
; This library now also includes semgrep_output_v1.atd (see the dune rules
; below). This ATD file used to be in reporting/ because it was concerned
; mostly with JSON reporting of a scan result, but it now contains core data
; definitions (e.g., engine_kind, core_error_kind, skip_reason,
; matching_operation) reused in the OCaml core code, which is why it was moved
; here.

(library
 (public_name semgrep.rule)
 (name semgrep_core_rule)
 (wrapped false)
 (libraries
   ; standard libraries
   semver
   atdgen-runtime

   ; in libs/
   base
   collections
   commons
   glob
   lib_parsing
   ast_generic
   ; Rule.ml references Spacegrep.Pattern_AST.t
   spacegrep
   aliengrep

   ; in languages/
   ; TODO ugly dependency to Ast_js.default_entity in Pattern.ml
   parser_javascript.ast

   ; in src/
   ; We should also not depend on any other semgrep libs (except the one below
   ; because of our use of Rule_options.atd)
   semgrep.configuring

   ; in cli/src/semgrep/semgrep_interfaces/
   semgrep.interfaces

 )
 (preprocess
   (pps
     ppx_profiling
     ppx_deriving.show
     ppx_deriving.eq
     ppx_deriving.ord
     ppx_deriving_yojson
     ppx_hash
     ppx_sexp_conv
   )
 )
)

; this is for rule_schema_v2_t.ml which contains multiple types
; using the same field names
(env
  (_
    (flags (:standard  -w -30))))
