Module Yalo.Types

type filepath = string list
type plugin = {
  1. plugin_name : string;
  2. plugin_version : string;
  3. mutable plugin_languages : language EzCompat.StringMap.t;
  4. mutable plugin_namespaces : namespace EzCompat.StringMap.t;
  5. mutable plugin_args : (string list * Ezcmd.V2.EZCMD.spec * Ezcmd.V2.EZCMD.TYPES.info) list;
}
and language = {
  1. lang_plugin : plugin;
  2. lang_name : string;
  3. mutable lang_kinds : file_kind EzCompat.StringMap.t;
}
and file_kind = {
  1. kind_uid : int;
  2. kind_language : language;
  3. kind_name : string;
  4. kind_exts : string list;
  5. kind_validate : file_doc:document -> bool;
  6. kind_lint : file:file -> unit;
}
and namespace = {
  1. ns_plugin : plugin;
  2. ns_name : string;
  3. mutable ns_warnings_by_num : warning EzCompat.IntMap.t;
  4. mutable ns_warnings_by_name : warning EzCompat.StringMap.t;
  5. mutable ns_linters : linter EzCompat.StringMap.t;
}
and tag = {
  1. tag_name : string;
  2. mutable tag_warnings : warning list;
}
and warning = {
  1. w_namespace : namespace;
  2. w_num : int;
  3. w_idstr : string;
  4. w_name : string;
  5. mutable w_tags : tag list;
  6. mutable w_linters : linter EzCompat.StringMap.t;
  7. w_msg : string;
  8. mutable w_set_by_default : bool;
  9. mutable w_state : warning_state;
  10. mutable w_level_error : bool;
  11. w_desc : string;
}
and warning_state =
  1. | Warning_disabled
  2. | Warning_sleeping
  3. | Warning_enabled
  4. | Warning_forced
and project = {
  1. project_name : string;
  2. mutable project_files : file list;
}
and fs = {
  1. fs_root : string;
  2. fs_folder : folder;
  3. fs_subpath : string list;
  4. fs_project : project;
}
and folder = {
  1. folder_fs : fs;
  2. folder_parent : folder;
  3. folder_basename : string;
  4. folder_name : string;
  5. mutable folder_other_names : string list;
  6. mutable folder_tags : EzCompat.StringSet.t;
  7. mutable folder_projects : project EzCompat.StringMap.t;
  8. mutable folder_scan : scan_kind;
  9. mutable folder_docs : document EzCompat.StringMap.t;
  10. mutable folder_folders : folder EzCompat.StringMap.t;
}
and scan_kind =
  1. | Scan_disabled
  2. | Scan_forced
  3. | Scan_maybe
and document = {
  1. doc_parent : folder;
  2. doc_uid : int;
  3. doc_basename : string;
  4. doc_name : string;
  5. mutable doc_other_names : string list;
  6. mutable doc_tags : EzCompat.StringSet.t;
  7. mutable doc_file : file option;
}
and file = {
  1. file_kind : file_kind;
  2. file_doc : document;
  3. file_name : string;
  4. file_crc : Stdlib.Digest.t;
  5. mutable file_warnings_done : EzCompat.StringSet.t;
  6. mutable file_done : bool;
  7. mutable file_projects : project EzCompat.StringMap.t;
  8. mutable file_messages : message EzCompat.StringMap.t;
}
and position = Stdlib.Lexing.position = {
  1. pos_fname : string;
  2. pos_lnum : int;
  3. pos_bol : int;
  4. pos_cnum : int;
}
and location = Location.t = {
  1. loc_start : position;
  2. loc_end : position;
  3. loc_ghost : bool;
}
and message = {
  1. msg_warning : warning;
  2. msg_file : file;
  3. msg_linter : linter;
  4. msg_idstr : string;
  5. msg_loc : location;
  6. msg_string : string;
  7. msg_autofix : (location * string) list;
  8. msg_target : target;
}
and linter = {
  1. linter_name : string;
  2. linter_idstr : string;
  3. linter_lang : language;
  4. linter_namespace : namespace;
  5. linter_warnings : warning EzCompat.StringMap.t;
  6. mutable linter_active : bool;
  7. linter_begin : unit -> unit;
  8. linter_open : file:file -> linter:linter -> unit;
  9. linter_install : linter -> unit;
  10. linter_close : file:file -> linter:linter -> unit;
  11. linter_end : unit -> unit;
}
and annot_desc =
  1. | Annot_begin_warning
  2. | Annot_end_warning
  3. | Annot_spec of string
  4. | Annot_check of string * bool
and 'a annotation = {
  1. annot_loc : location;
  2. annot_target : target;
  3. annot_desc : 'a;
  4. annot_file : file;
}
and target = {
  1. target_name : string;
  2. target_uid : int;
  3. mutable target_annots : annot_desc annotation list;
  4. mutable target_checks : (string * location * bool) list;
  5. mutable target_messages : message list;
}
type src_line_input = {
  1. line_loc : Location.t;
  2. line_line : string;
  3. line_sep : string;
}
type src_file_input = {
  1. file_loc : Location.t;
}
type src_content_input = {
  1. content_loc : Location.t;
  2. content_string : string;
}
type file_attr =
  1. | Project of string list
  2. | Skip of bool
  3. | Tag of string
  4. | Ignore of string list
type message_format =
  1. | Format_Human
  2. | Format_Context
  3. | Format_Sarif
  4. | Format_Short
  5. | Format_Summary
type warning_desc = {
  1. desc_name : string;
  2. desc_msg : string;
  3. desc_tags : string list;
  4. desc_what_it_does : string option;
  5. desc_why_restrict_this : string option;
  6. desc_known_issues : string option;
  7. desc_example : string option;
  8. desc_configuration : (string * string) list;
}