package dunolint

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dunolint-0.0.20251006.tbz
sha256=1b064927c9e1ef5352a1886ae34a206fef0ce6a913c19a77b0162acc108e0e50
sha512=6cbc08ba318bef6584d15a4491e3dde1bf436109ce0f8b7c400a9f91bbcee64c5785bc924df11eafe98243ec2f188a7f92c58c5062729f3e2af1e9977f1a5e67

doc/dunolint.dunolint_engine/Dunolint_engine/Context/index.html

Module Dunolint_engine.ContextSource

Auto-discovery and accumulation of contextual information during tree traversal.

This module provides a context that is built up as the linting engine traverses the directory tree, accumulating information that affects how linting is performed.

The context currently holds a list of dunolint configurations. The order follows the principle of a functional stack: data is added at the head as it is discovered when going deeper in the directory structure, and the configs function returns them in rule processing order (shallowest to deepest).

Planned evolution

The context is designed to support future enhancements:

  1. Config autoloading: Automatically discover and load dunolint config files from the workspace root and subdirectories during traversal, with location tracking to enable path-relative rule evaluation.
  2. Additional dune context: Include information from enclosing dune-project files and dune describe output to provide richer context for linting rules (e.g., project metadata, library dependencies).
Sourcetype t
Sourceval empty : t

An empty context.

Sourcemodule Config_with_location : sig ... end

Configuration with its location in the directory tree.

Sourceval add_config : t -> config:Dunolint.Config.t -> location:Fpath_base.Relative_path.t -> t

Add a discovered config at the specified location.

Get the list of discovered configs with their locations. Returns configs in rule processing order: from least specific (root) to most specific (closest to current location), so that deeper configs can override rules from shallower configs.

On This Page
  1. Planned evolution