package dunolint
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=d92e0d705b661ea12b22dcc9bdd83815c507218c1de085d75140fd47bea0c5ec
sha512=fdf4fbb4906aba4aeab766dfa5202b64950c71c988b1b84363319dd05edb93b34142355f968a5687057977e40defdced20a2a17ee0614565096eb123655621f3
doc/dunolint.dunolinter/Dunolinter/Linter/index.html
Module Dunolinter.LinterSource
type 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;
} -> t
Helpers
val 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.