package patdiff

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Patdiff.ConfigurationSource

This module extends Patdiff_kernel.Configuration with an on-disk config format and functions to parse them.

include module type of struct include Patdiff_kernel.Configuration end
Sourceval default_context : int

Default amount of context shown around each change in the diff

The following constants were all chosen empirically.

Sourceval default_line_big_enough : int

Default cutoff for line-level semantic cleanup. Any match of default_line_big_enough or more will not be deleted, even if it's surrounded by large inserts and deletes. Raising this quantity can only decrease the number of matches, and lowering it can only increase the number of matches.

Sourceval default_word_big_enough : int

Analogous to default_line_big_enough, but for word-level refinement

Sourceval too_short_to_split : int

Governs the behavior of split_for_readability. We will only split ranges around matches of size greater than too_short_to_split. Note that this should always be at least 1, otherwise we will split on a single `Newline token. Raising this quantity will result in less ranges being split, and setting it to infinity is the same as passing in ~interleave:false.

Sourceval warn_if_no_trailing_newline_in_both_default : bool
Sourcetype t = private Patdiff_kernel.Configuration.t = {
  1. output : Patdiff_kernel.Output.t;
  2. rules : Patdiff_kernel.Format.Rules.t;
  3. float_tolerance : Core.Percent.t option;
  4. produce_unified_lines : bool;
  5. unrefined : bool;
  6. keep_ws : bool;
  7. split_long_lines : bool;
  8. interleave : bool;
  9. assume_text : bool;
  10. context : int;
  11. line_big_enough : int;
  12. word_big_enough : int;
  13. shallow : bool;
  14. quiet : bool;
  15. double_check : bool;
  16. mask_uniques : bool;
  17. prev_alt : string option;
  18. next_alt : string option;
  19. location_style : Patdiff_kernel.Format.Location_style.t;
  20. warn_if_no_trailing_newline_in_both : bool;
}
include Ppx_compare_lib.Comparable.S with type t := t
Sourceval compare : t Base__Ppx_compare_lib.compare
Sourceval warn_if_no_trailing_newline_in_both : t -> bool
Sourceval next_alt : t -> string option
Sourceval prev_alt : t -> string option
Sourceval mask_uniques : t -> bool
Sourceval double_check : t -> bool
Sourceval quiet : t -> bool
Sourceval shallow : t -> bool
Sourceval word_big_enough : t -> int
Sourceval line_big_enough : t -> int
Sourceval context : t -> int
Sourceval assume_text : t -> bool
Sourceval interleave : t -> bool
Sourceval split_long_lines : t -> bool
Sourceval keep_ws : t -> bool
Sourceval unrefined : t -> bool
Sourceval produce_unified_lines : t -> bool
Sourceval float_tolerance : t -> Core.Percent.t option
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
include Core.Invariant.S with type t := t
Sourceval invariant : t Base__Invariant_intf.inv
Sourceval create_exn : output:Patdiff_kernel.Output.t -> rules:Patdiff_kernel.Format.Rules.t -> float_tolerance:Core.Percent.t option -> produce_unified_lines:bool -> unrefined:bool -> keep_ws:bool -> split_long_lines:bool -> interleave:bool -> assume_text:bool -> context:int -> line_big_enough:int -> word_big_enough:int -> shallow:bool -> quiet:bool -> double_check:bool -> mask_uniques:bool -> prev_alt:string option -> next_alt:string option -> location_style:Patdiff_kernel.Format.Location_style.t -> warn_if_no_trailing_newline_in_both:bool -> t

Raises if invariant t fails.

Sourceval override : ?output:Patdiff_kernel.Output.t -> ?rules:Patdiff_kernel.Format.Rules.t -> ?float_tolerance:Core.Percent.t option -> ?produce_unified_lines:bool -> ?unrefined:bool -> ?keep_ws:bool -> ?split_long_lines:bool -> ?interleave:bool -> ?assume_text:bool -> ?context:int -> ?line_big_enough:int -> ?word_big_enough:int -> ?shallow:bool -> ?quiet:bool -> ?double_check:bool -> ?mask_uniques:bool -> ?prev_alt:string option -> ?next_alt:string option -> ?location_style:Patdiff_kernel.Format.Location_style.t -> ?warn_if_no_trailing_newline_in_both:bool -> t -> t
Sourceval default : t
Sourceval load : ?quiet_errors:bool -> string -> t option
Sourceval dark_bg : t Core.Lazy.t
Sourceval light_bg : t Core.Lazy.t
Sourcemodule On_disk : sig ... end
Sourceval parse : On_disk.t -> t
Sourceval save_default : filename:string -> unit
Sourceval get_config : ?filename:string -> unit -> t

Reads a config from filename, which by default is ~/.patdiff. If ~filename:"" is passed or filename cannot be read, returns default.

OCaml

Innovation. Community. Security.