package dunolint

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dunolint-0.0.20250804.tbz
sha256=e4ca7c98db73dd9ab2ae8cba37ee0645f580267484e9893dbce6e28f4f2f0170
sha512=7ca658fb96139a0c41724355ac6aaf83d75468c7df14569b8f6090711f73a8fb2408ed1145384e756418682f0fa660a915842fd2b3f8b42e5ed4990e795b384e

doc/dunolint.dunolinter/Dunolinter/index.html

Module DunolinterSource

A common library used by other linters and rewriters in the project.

The goal of this library is to capture common utils useful for the module that handle the linting of supported files such as dune and dune-project files. This module is a shared dependencies regrouping common functionality that can be generalized and/or parametrized.

Sourcemodule Comment_handler : sig ... end

A utility module to help with the management of comments in sexps files.

Sourcemodule Enforce_result : sig ... end

A type to describe the result of an attempt to enforce a predicate during linting.

Sourcemodule Handler : sig ... end

A handler for evaluating and enforcing predicates.

Sourcemodule Linter : sig ... end
Sourcemodule Linters : sig ... end

A data structure to hold linters with a binary search lookup based on field name.

Sourcemodule Ordered_set : sig ... end
Sourcemodule Sections_handler : sig ... end

A utility module to help with the management of fields containing separated sections.

Sourcemodule Sexp_handler : sig ... end

A handler for fields found in a dune stanza (in files "dune", "dune-project", etc.)

Sourcemodule Stanza_linter : sig ... end
Sourcemodule Stanza : sig ... end
Sourcemodule type S = sig ... end

A linter for a file containing stanzas.

Returns the path of the file where the stanza was located when it was loaded.

Sourceval linter : _ Stanza.t -> Linter.t

Stanzas that do not have support for predicate enforcement shall be ignored when using this interface, they will be left untouched by dunolint.

Sourceval match_stanza : 'a Stanza.t -> 'a

If you are writing a custom rewriter perhaps you'll find it easier to use directly the stanza API provided by a linter library, in which case you'll need this accessor. In this use of the library, you perform side effects to 'a directly using the linter api, rather than going through the enforcement of configurable conditions.

Sourceval original_sexp : _ Stanza.t -> Base.Sexp.t

That is the sexp that correspond to the entire stanza held by this rewriter. These are the sexps found at the top level of dune files, for example (library ..) or (executable ..).

This accessor is provided if you desire to implement a low-level rewriter using Sexps_rewriter.

Sourceval sexps_rewriter : _ Stanza.t -> Sexps_rewriter.t

That is the Sexps_rewriter that was created to read the stanza held by this rewriter.

Sourceval eval_path : path:Fpath_base.Relative_path.t -> condition:Dunolint.Path.Predicate.t Dunolint.Std.Blang.t -> Dunolint.Trilang.t

A shared util to evaluate a predicate on paths. This is used to evaluate the skip_subtree part of a dunolint config.

Sourcemodule Private : sig ... end
OCaml

Innovation. Community. Security.