Dunolinter.LinterSourcetype t = | Unhandled| T : {eval : path:Fpath_sexp0.Relative_path.t ->
predicate:Dunolint.Predicate.t ->
Dunolint.Trilang.t;enforce : path:Fpath_sexp0.Relative_path.t ->
condition:Dunolint.Predicate.t Dunolint.Std.Blang.t ->
Base.unit;} -> tval enforce :
(module Handler.Predicate with type t = 'predicate) ->
eval:('t -> predicate:'predicate -> Dunolint.Trilang.t) ->
enforce:('t -> 'predicate Predicate.t -> Enforce_result.t) ->
't ->
condition:'predicate Dunolint.Std.Blang.t ->
Base.unitA helper function that can be useful to implement the enforce function required by the Linter.S interface.
Search for an initial value that can be used to initialize an absent field.
Only predicates at positive enforcing positions (Base and And) are considered. The function f should return Some value for predicates that can provide a concrete initial value (like equals), and None for predicates that cannot (like is_prefix or is_suffix).
Returns the first matching value found, or None if no predicate can provide an initial value.
A helper that applies some usually helpful heuristic when proposing a new name based on the `is_prefix predicate. Assumed to be called when the given prefix is not already a prefix of the input, otherwise the output is unspecified.