package opam-state
Install
Dune Dependency
Authors
-
VVincent Bernardoff <vb@luminar.eu.org>
-
RRaja Boujbel <raja.boujbel@ocamlpro.com>
-
RRoberto Di Cosmo <roberto@dicosmo.org>
-
TThomas Gazagnaire <thomas@gazagnaire.org>
-
LLouis Gesbert <louis.gesbert@ocamlpro.com>
-
FFabrice Le Fessant <Fabrice.Le_fessant@inria.fr>
-
AAnil Madhavapeddy <anil@recoil.org>
-
GGuillem Rieu <guillem.rieu@ocamlpro.com>
-
RRalf Treinen <ralf.treinen@pps.jussieu.fr>
-
FFrederic Tuong <tuong@users.gforge.inria.fr>
Maintainers
Sources
md5=798911b81a5359e5f632416e895e7e3e
sha512=2ade3998a94333a5a838b55e229ab0c707e678481cae892980b986fb86f39163070a9b7d3e0e87879cd57b91a33bf6a3e15f3786c3510a635e59383782218f1d
doc/opam-state/OpamFileTools/index.html
Module OpamFileTools
Source
Tools for manipulating and checking package definition ("opam") files
Create an OPAM package template filled with common options
val lint :
?check_extra_files:(OpamTypes.basename * (OpamHash.t -> bool)) list ->
?check_upstream:bool ->
OpamFile.OPAM.t ->
(int * [ `Warning | `Error ] * string) list
Runs several sanity checks on the opam file; returns a list of warnings. `Error
level should be considered unfit for publication, while `Warning
are advisory but may be accepted. The int is an identifier for this specific warning/error. If check_extra_files
is unspecified, warning 53 won't be checked.
val lint_file :
?check_extra_files:(OpamTypes.basename * (OpamHash.t -> bool)) list ->
?check_upstream:bool ->
OpamFile.OPAM.t OpamFile.typed_file ->
(int * [ `Warning | `Error ] * string) list * OpamFile.OPAM.t option
Same as lint
, but operates on a file, which allows catching parse errors too. You can specify an expected name and version. check_extra_files
defaults to a function that will look for a files/
directory besides filename
val lint_channel :
?check_extra_files:(OpamTypes.basename * (OpamHash.t -> bool)) list ->
?check_upstream:bool ->
OpamFile.OPAM.t OpamFile.typed_file ->
in_channel ->
(int * [ `Warning | `Error ] * string) list * OpamFile.OPAM.t option
Same as lint_file
, but taking input from a channel. check_extra_files
defaults to a function that will look for a files/
directory besides filename
val lint_string :
?check_extra_files:(OpamTypes.basename * (OpamHash.t -> bool)) list ->
?check_upstream:bool ->
OpamFile.OPAM.t OpamFile.typed_file ->
string ->
(int * [ `Warning | `Error ] * string) list * OpamFile.OPAM.t option
Like lint_file
, but takes the file contents as a string. check_extra_files
defaults to a function that will look for a files/
directory besides filename
Utility function to print validation results
Read the opam metadata from a given directory (opam file, with possible overrides from url and descr files). Also includes the names and hashes of files below files/
val add_aux_files :
?dir:OpamTypes.dirname ->
files_subdir_hashes:bool ->
OpamFile.OPAM.t ->
OpamFile.OPAM.t
Adds data from 'url' and 'descr' files found in the specified dir or the opam file's metadata dir, if not already present in the opam file. if files_subdir_hashes
is true
, also adds the names and hashes of files found below 'files/'
val map_all_variables :
(OpamTypes.full_variable -> OpamTypes.full_variable) ->
OpamFile.OPAM.t ->
OpamFile.OPAM.t
Tools to manipulate the OpamFile.OPAM.t
contents
val map_all_filters :
(OpamTypes.filter -> OpamTypes.filter) ->
OpamFile.OPAM.t ->
OpamFile.OPAM.t