package dunolint
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=1b064927c9e1ef5352a1886ae34a206fef0ce6a913c19a77b0162acc108e0e50
sha512=6cbc08ba318bef6584d15a4491e3dde1bf436109ce0f8b7c400a9f91bbcee64c5785bc924df11eafe98243ec2f188a7f92c58c5062729f3e2af1e9977f1a5e67
doc/dunolint.dunolint_engine/Dunolint_engine/Context/index.html
Module Dunolint_engine.Context
Source
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:
- 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.
- 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).
Configuration with its location in the directory tree.
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.