package dunolint

  1. Overview
  2. Docs
A linter for build files in dune projects

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dunolint-0.0.20260306.tbz
sha256=d92e0d705b661ea12b22dcc9bdd83815c507218c1de085d75140fd47bea0c5ec
sha512=fdf4fbb4906aba4aeab766dfa5202b64950c71c988b1b84363319dd05edb93b34142355f968a5687057977e40defdced20a2a17ee0614565096eb123655621f3

doc/dunolint.dunolinter/Dunolinter/Handler/index.html

Module Dunolinter.HandlerSource

A handler for evaluating and enforcing predicates.

Sourcetype Effect.t += private
  1. | Enforce_failure : {
    1. condition : 'a;
    2. sexp_of_condition : 'a -> Dunolint_stdlib.Sexp.t;
    3. loc : Loc.t;
    } -> Base.unit Effect.t
    (*

    A effect performed when a linter comes across a condition that is requested to be enforced, but there is no defined semantic for enforcing it automatically. Depending on the context, the course of actions to react to such case may vary. During linting, it may make sense to produce an error, and continue with the flow to check other rules and the other files. During a more focused execution, perhaps this error shall be fatal.

    *)
Sourcemodule type Predicate = sig ... end
Sourceval enforce_failure : (module Predicate with type t = 'a) -> loc:Loc.t -> condition:'a Dunolint.Std.Blang.t -> Base.unit
Sourceval emit_error_and_resume : 'a -> loc:Loc.t -> f:('a -> 'b) -> 'b

This is a special handler for the effect defined by this module, which will report the error, but continue the execution of linting and enforcing with other rules, predicates and stanzas.

Sourceval raise : f:(Base.unit -> 'a) -> 'a

This is a handler for the effect defined by this module, which will discontinue the effect with an exception. It is suitable for use in expect tests.