OCaml library and CLI for OCI and Docker image manipulation
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(oci): add content_type pp, fix doc style, dune fmt

Add Content_type.pp printer. Fix doc comment style in common.mli.
Apply dune fmt formatting to merlint and test_checkout.

+10 -8
+4 -4
src/spec/common.mli
··· 26 26 association lists encoded as JSON objects. *) 27 27 28 28 val env_jsont : env Jsont.t 29 - (** JSON codec for [KEY=VALUE] environment variable strings. *) 29 + (** [env_jsont] is a JSON codec for [KEY=VALUE] environment variable strings. *) 30 30 31 31 val set_jsont : set Jsont.t 32 32 (** JSON codec for sets encoded as JSON objects with empty values. *) ··· 35 35 (** JSON codec for the empty object. *) 36 36 37 37 val v2_jsont : v2 Jsont.t 38 - (** JSON codec that expects [schemaVersion] to be [2]. *) 38 + (** [v2_jsont] is a JSON codec that expects [schemaVersion] to be [2]. *) 39 39 40 40 val rfc_6838_jsont : rfc_6838 Jsont.t 41 41 (** JSON codec for RFC 6838 media type strings. *) ··· 46 46 (** {1 Errors} *) 47 47 48 48 val error : ('a, Format.formatter, unit, ('b, string) result) format4 -> 'a 49 - (** [error fmt ...] returns [Error msg]. *) 49 + (** [error fmt] returns [Error msg]. *) 50 50 51 51 val error_msg : 52 52 ('a, Format.formatter, unit, ('b, [ `Msg of string ]) result) format4 -> 'a 53 - (** [error_msg fmt ...] returns [Error (`Msg msg)]. *) 53 + (** [error_msg fmt] returns [Error (`Msg msg)]. *) 54 54 55 55 val unwrap : ('a, [ `Msg of string ]) result -> ('a, string) result 56 56 (** [unwrap r] converts [`Msg] errors to plain strings. *)
+2
src/spec/content_type.ml
··· 80 80 let ps = List.map (fun (k, v) -> k ^ "=" ^ v) t.parameters in 81 81 String.concat ~sep:"; " (p :: ps) 82 82 83 + let pp ppf t = Fmt.string ppf (to_string t) 84 + 83 85 let jsont = 84 86 Jsont.map ~kind:"content_type" 85 87 ~dec:(fun s ->
+3
src/spec/content_type.mli
··· 10 10 11 11 val to_string : t -> string 12 12 (** [to_string t] serializes the content type to its string representation. *) 13 + 14 + val pp : t Fmt.t 15 + (** [pp ppf t] pretty-prints the content type. *)
+1 -4
test/spec/test_checkout.ml
··· 23 23 (* Verify platform parameter is optional *) 24 24 ignore 25 25 (Oci.checkout ~platform:"linux/amd64" 26 - : cache:Oci.Cache.t -> 27 - root:[ `Dir ] Eio.Path.t -> 28 - Oci.Image.t -> 29 - unit) 26 + : cache:Oci.Cache.t -> root:[ `Dir ] Eio.Path.t -> Oci.Image.t -> unit) 30 27 31 28 let suite = 32 29 ( "checkout",