Select the types of activity you want to include in your feed.
cfdp: fix merlint issues across lib and tests
- Replace Printf.sprintf/Format.fprintf with Fmt.str/Fmt.pf - Rename test_ prefixed functions in interop tests - Fix _buf bindings (used, shouldn't have underscore) - Snake_case test suite name
···11381138 if hdr.crc_present then begin
11391139 let full = Bytes.of_string (hdr_bytes ^ data) in
11401140 let crc = crc16_ccitt_sub full 0 (Bytes.length full) in
11411141- let crc_buf = Bytes.create 2 in
11421142- Bytes.set_uint16_be crc_buf 0 crc;
11431143- Bytes.to_string full ^ Bytes.to_string crc_buf
11411141+ let crcbuf = Bytes.create 2 in
11421142+ Bytes.set_uint16_be crcbuf 0 crc;
11431143+ Bytes.to_string full ^ Bytes.to_string crcbuf
11441144 end
11451145 else hdr_bytes ^ data
11461146···12651265 },
12661266 consumed ))
1267126712681268-let decode_finished _buf off len =
12681268+let decode_finished buf off len =
12691269 if len < 2 then Error (Truncated { need = 2; have = len })
12701270 else
12711271 match
12721272- Wire.Codec.decode finished_codec (Bytes.unsafe_of_string _buf) (off + 1)
12721272+ Wire.Codec.decode finished_codec (Bytes.unsafe_of_string buf) (off + 1)
12731273 with
12741274 | Error e -> Error (wire_error_to_cfdp e)
12751275 | Ok pf -> (
···12981298 },
12991299 2 ))
1300130013011301-let decode_ack _buf off len =
13011301+let decode_ack buf off len =
13021302 if len < 3 then Error (Truncated { need = 3; have = len })
13031303 else
13041304 match
13051305- Wire.Codec.decode ack_codec (Bytes.unsafe_of_string _buf) (off + 1)
13051305+ Wire.Codec.decode ack_codec (Bytes.unsafe_of_string buf) (off + 1)
13061306 with
13071307 | Error e -> Error (wire_error_to_cfdp e)
13081308 | Ok pa -> (
···13691369 if len < min_len then Error (Truncated { need = min_len; have = len })
13701370 else
13711371 (* Decode scope fields from off+1 (skip directive code) using byte_array *)
13721372- let scope_buf = Bytes.unsafe_of_string buf in
13721372+ let scopebuf = Bytes.unsafe_of_string buf in
13731373 let sscope = be_bytes_to_int64 (String.sub buf (off + 1) fss_len) in
13741374 let escope =
13751375 be_bytes_to_int64 (String.sub buf (off + 1 + fss_len) fss_len)
···13801380 let curr_off = ref (off + 1 + (2 * fss_len)) in
13811381 for _ = 1 to seg_count do
13821382 let soff =
13831383- be_bytes_to_int64 (Bytes.sub_string scope_buf !curr_off fss_len)
13831383+ be_bytes_to_int64 (Bytes.sub_string scopebuf !curr_off fss_len)
13841384 in
13851385 let eoff =
13861386 be_bytes_to_int64
13871387- (Bytes.sub_string scope_buf (!curr_off + fss_len) fss_len)
13871387+ (Bytes.sub_string scopebuf (!curr_off + fss_len) fss_len)
13881388 in
13891389 segs := { start_offset = soff; end_offset = eoff } :: !segs;
13901390 curr_off := !curr_off + (2 * fss_len)
···13981398 },
13991399 !curr_off - off )
1400140014011401-let decode_prompt _buf off len =
14011401+let decode_prompt buf off len =
14021402 if len < 2 then Error (Truncated { need = 2; have = len })
14031403 else
14041404 match
14051405- Wire.Codec.decode prompt_codec (Bytes.unsafe_of_string _buf) (off + 1)
14051405+ Wire.Codec.decode prompt_codec (Bytes.unsafe_of_string buf) (off + 1)
14061406 with
14071407 | Error e -> Error (wire_error_to_cfdp e)
14081408 | Ok pp ->
+2-2
lib/eio/cfdp_eio.ml
···5656 let hdr = Eio.Buf_read.take 4 buf_r in
5757 let len = Int32.to_int (String.get_int32_be hdr 0) in
5858 if len <= 0 || len > 1_048_576 then
5959- Error (Format.asprintf "invalid frame length: %d" len)
5959+ Error (Fmt.str "invalid frame length: %d" len)
6060 else Ok (Eio.Buf_read.take len buf_r)
61616262(* ── PDU I/O ───────────────────────────────────────────────────────────── *)
···7171 | Ok data -> (
7272 match Cfdp.decode data with
7373 | Ok (pdu, _consumed) -> Ok pdu
7474- | Error e -> Error (Format.asprintf "%a" Cfdp.pp_error e))
7474+ | Error e -> Error (Fmt.str "%a" Cfdp.pp_error e))
75757676(* ── Helpers ───────────────────────────────────────────────────────────── *)
7777
+1-1
lib/eio/filestore_eio.ml
···3333 | `Regular_file ->
3434 Eio.Path.with_open_in p @@ fun file ->
3535 Ok (Eio.File.size file |> Optint.Int63.to_int64)
3636- | _ -> Error (Io_error (Printf.sprintf "%s: not a regular file" path))
3636+ | _ -> Error (Io_error (Fmt.str "%s: not a regular file" path))
3737 with
3838 | Eio.Io (Eio.Fs.E (Eio.Fs.Not_found _), _) -> Error (Not_found path)
3939 | Eio.Io (Eio.Fs.E (Eio.Fs.Permission_denied _), _) ->