package dunolint
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=1b064927c9e1ef5352a1886ae34a206fef0ce6a913c19a77b0162acc108e0e50
sha512=6cbc08ba318bef6584d15a4491e3dde1bf436109ce0f8b7c400a9f91bbcee64c5785bc924df11eafe98243ec2f188a7f92c58c5062729f3e2af1e9977f1a5e67
doc/dunolint.dune_project_linter/Dune_project_linter/Name/index.html
Module Dune_project_linter.Name
Source
include Dunolinter.Stanza_linter.S
with type t := t
and type predicate = Dunolint.Std.Dune_project.Name.Predicate.t
If the stanza already exists, parse the value currently present. The sexps_rewriter
is given in order to find locations of the supplied sexp to supply to the error messages. Errors are raised if the arguments do not have the expected shape for that field.
Write as a new field. This is used to create the field the first time it is introduced in a stanza, such as when a new dune file is created by dunolint.
When the field is already present, it may be necessary to merge the existing values with the expected one. In this case we do not write the field from scratch, instead we refactor it using a rewrite. The field
sexp is expected to be taken from the sexps_rewriter
and must be the original sexp that represent the entire field.
If the stanza already exists, all we do is some linting, that is we update it if needed, and perhaps generating some errors or warnings along the way. To be called with the sexps that follow the "(library)" atom, which are labeled "fields".
This has the effect of side-effecting the File_rewriter
that is contained by the sexps_rewriter
parameter. For this call to be useful, it is assumed that the caller is going to output the resulting rewrite, and do something with it. The field
sexp is expected to be taken from the sexps_rewriter
and must be the original sexp that represent the entire field.
module Linter :
Dunolinter.Linter.S
with type t = t
and type predicate = Dunolint.Std.Dune_project.Predicate.t