package dunolint
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=b44119c96aeabb960e852711c2f20ae43f0011e796f05e012141ba980a5b58f6
sha512=5bf76732adc940db6cac0875e94c3eaff436288faba95388b9675c68b3f30f5362e01f289fc8a096325f7db812ace273773a1e051ab7d7ace3b8db4a57a0e070
doc/dunolint.dune_linter/Dune_linter/Flags/index.html
Module Dune_linter.Flags
Source
The "flags" to be passed to OCaml.
At the moment there is not predicate nor enforceable conditions on flags. TBD.
include Dunolinter.Stanza_linter.S
with type t := t
and type predicate := Base.Nothing.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.