Dunolint Documentation

website·Indexed 30 days ago

https://mbarbin.github.io/dunolint

API documentation for Dunolint, featuring modules for Dune instrumentation, a unified-diff renderer based on the Myers shortest-edit-script algorithm, and a standard library including character and list utilities.

Tokens
69.1K
Snippets
555
Records
671
Agent score
75%

What's inside Dunolint

  1. Overview of dunolint for OCaml Dune projects

    dunolint is a set of libraries and a CLI tool used to maintain and lint build files (such as dune and dune-project) in OCaml repositories managed by the Dune build system. It allows developers to check customizable invariants, enforce consistency via CI pipelines, and perform systematic changes across multiple files. Common use cases include enabling instrumentation, configuring recurring lint or preprocess flags, and alphabetically sorting libraries.
  2. Overview of dunolint for Dune file linting

    dunolint is a linting tool for OCaml and Dune users designed to maintain and enforce consistency in dune files. In its early versions, it can enforce the sorting of dependencies, instrumentation, and the configuration of PPX and their associated flags. It is designed to be integrated into CI pipelines (e.g., GitHub Actions) to ensure project configuration standards are met.
  3. Overview of Dunolint library modules

    The Dunolint library provides types and selectors for linting dunolint configuration files. It is organized into several specialized modules including Blang, Condition, Config, Dune, Dune_project, Dune_workspace, Dunolint0, Glob, Linted_file_kind, Path, Predicate, Rule, Trilang, Std, and Private.
  4. Understand how Dunolint detects the workspace root

    Dunolint uses the same detection logic as Dune (vendored from Dune 3.20.2). It identifies the workspace root by searching for marker files (dune-workspace or dune-project) in the current directory and its ancestor directories. Once the root is found, Dunolint changes its working directory to that root to ensure consistent path resolution and configuration loading.
  5. Manage Dune library dependencies with Dune_linter.Libraries

    The Dune_linter.Libraries module provides a type t and a set of functions to handle the (libraries ...) stanza in Dune files. It allows developers to check for library dependencies, parse existing stanzas, and generate or rewrite S-expressions for Dune configuration files.
    (* Example S-expression syntax for libraries *)
    (libraries (mem ordering yojson))