My own corner of monopam
2
fork

Configure Feed

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

merlint fixes: .ocamlformat, Fmt.failwith, unused field names

- Add missing .ocamlformat to 4 packages (E500)
- stix: use Fmt.failwith instead of failwith (Fmt.str ...) (E700)
- mbr: rename _unused1/_unused2 fields — underscore prefix implies
unused but they're stored in the record (E726)

+18 -14
+1
ocaml-ccsds/.ocamlformat
··· 1 + profile = default
+12 -12
ocaml-mbr/lib/mbr.ml
··· 270 270 Wire.Field.v "bootstrap1" 271 271 (Wire.byte_array ~size:(Wire.int bootstrap_code1_len)) 272 272 273 - let f_unused1 = Wire.Field.v "unused1" (Wire.byte_array ~size:(Wire.int 2)) 273 + let funused1 = Wire.Field.v "unused1" (Wire.byte_array ~size:(Wire.int 2)) 274 274 let f_drive = Wire.Field.v "drive" Wire.uint8 275 275 let f_seconds = Wire.Field.v "seconds" Wire.uint8 276 276 let f_minutes = Wire.Field.v "minutes" Wire.uint8 ··· 281 281 (Wire.byte_array ~size:(Wire.int bootstrap_code2_len)) 282 282 283 283 let f_disk_sig = Wire.Field.v "disk_signature" Wire.uint32 284 - let f_unused2 = Wire.Field.v "unused2" (Wire.byte_array ~size:(Wire.int 2)) 284 + let funused2 = Wire.Field.v "unused2" (Wire.byte_array ~size:(Wire.int 2)) 285 285 let f_part1 = Wire.Field.v "partition1" (Wire.codec Partition.codec) 286 286 let f_part2 = Wire.Field.v "partition2" (Wire.codec Partition.codec) 287 287 let f_part3 = Wire.Field.v "partition3" (Wire.codec Partition.codec) ··· 305 305 (* Raw decoded MBR: all 4 partition slots present, signature bytes included *) 306 306 type raw = { 307 307 bootstrap1 : string; 308 - _unused1 : string; 308 + unused1 : string; 309 309 drive : int; 310 310 seconds : int; 311 311 minutes : int; 312 312 hours : int; 313 313 bootstrap2 : string; 314 314 disk_signature_raw : int; 315 - _unused2 : string; 315 + unused2 : string; 316 316 part1 : Partition.t; 317 317 part2 : Partition.t; 318 318 part3 : Partition.t; ··· 323 323 324 324 let raw_codec = 325 325 Wire.Codec.v "Mbr" 326 - (fun bootstrap1 _unused1 drive seconds minutes hours bootstrap2 327 - disk_signature_raw _unused2 part1 part2 part3 part4 sig1 sig2 -> 326 + (fun bootstrap1 unused1 drive seconds minutes hours bootstrap2 327 + disk_signature_raw unused2 part1 part2 part3 part4 sig1 sig2 -> 328 328 { 329 329 bootstrap1; 330 - _unused1; 330 + unused1; 331 331 drive; 332 332 seconds; 333 333 minutes; 334 334 hours; 335 335 bootstrap2; 336 336 disk_signature_raw; 337 - _unused2; 337 + unused2; 338 338 part1; 339 339 part2; 340 340 part3; ··· 345 345 Wire.Codec. 346 346 [ 347 347 (f_bootstrap1 $ fun r -> r.bootstrap1); 348 - (f_unused1 $ fun r -> r._unused1); 348 + (funused1 $ fun r -> r.unused1); 349 349 (f_drive $ fun r -> r.drive); 350 350 (f_seconds $ fun r -> r.seconds); 351 351 (f_minutes $ fun r -> r.minutes); 352 352 (f_hours $ fun r -> r.hours); 353 353 (f_bootstrap2 $ fun r -> r.bootstrap2); 354 354 (f_disk_sig $ fun r -> r.disk_signature_raw); 355 - (f_unused2 $ fun r -> r._unused2); 355 + (funused2 $ fun r -> r.unused2); 356 356 (f_part1 $ fun r -> r.part1); 357 357 (f_part2 $ fun r -> r.part2); 358 358 (f_part3 $ fun r -> r.part3); ··· 406 406 let raw = 407 407 { 408 408 bootstrap1 = String.sub t.bootstrap_code 0 bootstrap_code1_len; 409 - _unused1 = "\000\000"; 409 + unused1 = "\000\000"; 410 410 drive = t.original_physical_drive; 411 411 seconds = t.seconds; 412 412 minutes = t.minutes; ··· 415 415 String.sub t.bootstrap_code bootstrap_code1_len bootstrap_code2_len; 416 416 disk_signature_raw = 417 417 Wire.Private.UInt32.of_int (Int32.to_int t.disk_signature); 418 - _unused2 = "\000\000"; 418 + unused2 = "\000\000"; 419 419 part1 = nth 0; 420 420 part2 = nth 1; 421 421 part3 = nth 2;
+1
ocaml-respond/.ocamlformat
··· 1 + profile = default
+2 -2
ocaml-stix/lib/stix.ml
··· 487 487 Observed_data (decode_or_fail observed_data_jsont json_str) 488 488 | "sighting" -> Sighting (decode_or_fail sighting_jsont json_str) 489 489 | "relationship" -> Relationship (decode_or_fail relationship_jsont json_str) 490 - | t -> failwith (Fmt.str "unsupported STIX type: %s" t) 490 + | t -> Fmt.failwith "unsupported STIX type: %s" t 491 491 492 492 let encode_obj = function 493 493 | Attack_pattern a -> encode_or_fail attack_pattern_jsont a ··· 615 615 let body = Requests.Response.text resp in 616 616 match Jsont_bytesrw.decode_string codec body with 617 617 | Ok v -> v 618 - | Error e -> failwith (Fmt.str "TAXII JSON error: %s" e) 618 + | Error e -> Fmt.failwith "TAXII JSON error: %s" e 619 619 620 620 let discover session url = fetch_json session url discovery_jsont 621 621
+1
ocaml-udpcl/.ocamlformat
··· 1 + profile = default
+1
ocaml-vec3/.ocamlformat
··· 1 + profile = default