type json_trace_item = {
  level : int;
  filename : string;
  line_number : int;
  column_number : int;
  description : string;
}

type loc = {
  file: string;
  lnum: int;
  cnum: int;
  enum: int;
}

type extra = {
  ?cost_polynomial : string option;
  ?cost_degree : int option
}

type jsonbug = {
  bug_class : string;
  kind : string;
  bug_type : string;
  ?doc_url : string option;
  qualifier : string;
  severity : string;
  visibility : string;
  line: int;
  column: int;
  procedure : string;
  procedure_id : string;
  procedure_start_line : int;
  file : string;
  bug_trace : json_trace_item list;
  key : string;
  node_key : string;
  hash : string;
  ?dotty : string option;
  ?infer_source_loc: loc option;
  bug_type_hum: string;
  ?linters_def_file: string option;
  ?traceview_id: int option;
  censored_reason : string;
  ?access : string option;
  ?extras : extra option;
}

type report = jsonbug list

type json_trace = {
  trace : json_trace_item list;
}
