package crs
Source file location.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20(****************************************************************************) (* ocaml-reviewdog - A reviewdog diagnostics json serializer for OCaml *) (* SPDX-FileCopyrightText: 2025 Mathieu Barbin <mathieu.barbin@gmail.com> *) (* SPDX-License-Identifier: MIT *) (****************************************************************************) type t = { path : string ; range : Range.t option } let to_json { path; range } : Yojson.Basic.t = `Assoc (List.concat [ [ "path", `String path ] ; (match range with | None -> [] | Some r -> [ "range", Range.to_json r ]) ]) ;;