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/Comment_handler/index.html

Module Dunolinter.Comment_handlerSource

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

Sourceval extended_range : original_contents:Base.string -> range:Loc.Range.t -> Loc.Range.t

extended_range computes the range for a library entry, that includes the original range for the entry, but where the stop offset of the range may be shifted to the right, until the end of the line, if this captures a comment placed on the same line as the value.

For example:

 (libraries
    foo
    bar ;; a comment for bar on the same line
    baz)

extended_range foo will be foo's original range unchanged. And extended_range bar will include bar and its comment too.

Sourceval sexp_extended_range : sexps_rewriter:Sexps_rewriter.t -> arg:Dunolint_stdlib.Sexp.t -> Loc.Range.t

A convenient wrapper for extended_range that specializes to sexp arguments found when rewritting sexps with Sexps_rewriter.

Sourceval get_extended_source : original_contents:Base.string -> range:Loc.Range.t -> Base.string

A convenient wrapper that extracts and returns the substring matching the entire extended_range from the original contents.