.\" Pipe this output to groff -Tutf8 | less .\" .mso an.tmac .TH "opam-lint" 1 "" "Opam 2.0.0" "Opam Manual" .\" Disable hyphenation and ragged-right .nh .ad l .SH NAME .P opam\N'45'lint \N'45' Checks and validate package description (\N'39'opam\N'39') files\N'46' .SH SYNOPSIS .P \fBopam lint\fR [\fIOPTION\fR]\N'46'\N'46'\N'46' [\fIFILES\fR]\N'46'\N'46'\N'46' .SH DESCRIPTION .P Given an \fIopam\fR file, performs several quality checks on it and outputs recommendations, warnings or errors on stderr\N'46' .SH ARGUMENTS .TP 4 \fIFILES\fR Name of the opam files to check, or directory containing them\N'46' Current directory if unspecified .SH OPTIONS .TP 4 \fB\N'45'\N'45'normalise\fR Output a normalised version of the opam file to stdout .TP 4 \fB\N'45'\N'45'package\fR=\fIPKG\fR Lint the current definition of the given package instead of specifying an opam file directly\N'46' .TP 4 \fB\N'45's\fR, \fB\N'45'\N'45'short\fR Only print the warning/error numbers, space\N'45'separated, if any .TP 4 \fB\N'45'W\fR \fIWARNS\fR, \fB\N'45'\N'45'warnings\fR=\fIWARNS\fR Select the warnings to show or hide\N'46' \fIWARNS\fR should be a concatenation of \fB+N\fR, \fB\N'45'N\fR, \fB+N\N'46'\N'46'M\fR, \fB\N'45'N\N'46'\N'46'M\fR to respectively enable or disable warning or error number \fBN\fR or all warnings with numbers between \fBN\fR and \fBM\fR inclusive\N'46' All warnings are enabled by default, unless \fIWARNS\fR starts with \fB+\fR, which disables all but the selected ones\N'46' .SH COMMON OPTIONS .P These options are common to all commands\N'46' .TP 4 \fB\N'45'\N'45'best\N'45'effort\fR Don\N'39't fail if all requested packages can\N'39't be installed: try to install as many as possible\N'46' Note that not all external solvers may support this option (recent versions of \fIaspcud\fR or \fImccs\fR should)\N'46' .TP 4 \fB\N'45'\N'45'color\fR=\fIWHEN\fR Colorize the output\N'46' \fIWHEN\fR must be one of `always\N'39', `never\N'39' or `auto\N'39'\N'46' .TP 4 \fB\N'45'\N'45'criteria\fR=\fICRITERIA\fR Specify user \fIpreferences\fR for dependency solving for this run\N'46' Overrides both \fB$OPAMCRITERIA\fR and \fB$OPAMUPGRADECRITERIA\fR\N'46' For details on the supported language, and the external solvers available, see \fI http://opam\N'46'ocaml\N'46'org/doc/Specifying_Solver_Preferences\N'46'html\fR\N'46' A general guide to using solver preferences can be found at \fI http://www\N'46'dicosmo\N'46'org/Articles/usercriteria\N'46'pdf\fR\N'46' .TP 4 \fB\N'45'\N'45'cudf\fR=\fIFILENAME\fR Debug option: Save the CUDF requests sent to the solver to \fIFILENAME\fR\N'45'\N'46'cudf\N'46' .TP 4 \fB\N'45'\N'45'debug\fR Print debug message to stderr\N'46' This is equivalent to setting \fB$OPAMDEBUG\fR to "true"\N'46' .TP 4 \fB\N'45'\N'45'debug\N'45'level\fR=\fILEVEL\fR Like \fB\N'45'\N'45'debug\fR, but allows specifying the debug level (\fB\N'45'\N'45'debug\fR sets it to 1)\N'46' Equivalent to setting \fB$OPAMDEBUG\fR to a positive integer\N'46' .TP 4 \fB\N'45'\N'45'git\N'45'version\fR Print the git version of opam, if set (i\N'46'e\N'46' you are using a development version), and exit\N'46' .TP 4 \fB\N'45'\N'45'help\fR[=\fIFMT\fR] (default=auto) Show this help in format \fIFMT\fR\N'46' The value \fIFMT\fR must be one of `auto\N'39', `pager\N'39', `groff\N'39' or `plain\N'39'\N'46' With `auto\N'39', the format is `pager` or `plain\N'39' whenever the \fBTERM\fR env var is `dumb\N'39' or undefined\N'46' .TP 4 \fB\N'45'\N'45'ignore\N'45'pin\N'45'depends\fR Ignore extra pins required by packages that get pinned, either manually through \fIopam pin\fR or through \fIopam install DIR\fR\N'46' This is equivalent to setting \fBIGNOREPINDEPENDS=true\fR\N'46' .TP 4 \fB\N'45'\N'45'json\fR=\fIFILENAME\fR Save the results of the opam run in a computer\N'45'readable file\N'46' If the filename contains the character `%\N'39', it will be replaced by an index that doesn\N'39't overwrite an existing file\N'46' Similar to setting the \fB$OPAMJSON\fR variable\N'46' .TP 4 \fB\N'45'\N'45'no\N'45'auto\N'45'upgrade\fR When configuring or updating a repository that is written for an earlier opam version (1\N'46'2), opam internally converts it to the current format\N'46' This disables this behaviour\N'46' Note that repositories should define their format version in a \N'39'repo\N'39' file at their root, or they will be assumed to be in the older format\N'46' It is, in any case, preferable to upgrade the repositories manually using \fIopam admin upgrade [\N'45'\N'45'mirror URL]\fR when possible\N'46' .TP 4 \fB\N'45'\N'45'no\N'45'self\N'45'upgrade\fR Opam will replace itself with a newer binary found at \fBOPAMROOT/opam\fR if present\N'46' This disables this behaviour\N'46' .TP 4 \fB\N'45'q\fR, \fB\N'45'\N'45'quiet\fR Disables \fB\N'45'\N'45'verbose\fR\N'46' .TP 4 \fB\N'45'\N'45'root\fR=\fIROOT\fR Use \fIROOT\fR as the current root path\N'46' This is equivalent to setting \fB$OPAMROOT\fR to \fIROOT\fR\N'46' .TP 4 \fB\N'45'\N'45'safe\fR, \fB\N'45'\N'45'readonly\fR Make sure nothing will be automatically updated or rewritten\N'46' Useful for calling from completion scripts, for example\N'46' Will fail whenever such an operation is needed ; also avoids waiting for locks, skips interactive questions and overrides the \fB$OPAMDEBUG\fR variable\N'46' .TP 4 \fB\N'45'\N'45'solver\fR=\fICMD\fR Specify the CUDF solver to use for resolving package installation problems\N'46' This is either a predefined solver (this version of opam supports builtin\N'45'dummy\N'45'solver, aspcud, mccs, aspcud\N'45'old, packup), or a custom command that should contain the variables %{input}%, %{output}%, %{criteria}%, and optionally %{timeout}%\N'46' .TP 4 \fB\N'45'\N'45'strict\fR Fail whenever an error is found in a package definition or a configuration file\N'46' The default is to continue silently if possible\N'46' .TP 4 \fB\N'45'\N'45'switch\fR=\fISWITCH\fR Use \fISWITCH\fR as the current compiler switch\N'46' This is equivalent to setting \fB$OPAMSWITCH\fR to \fISWITCH\fR\N'46' .TP 4 \fB\N'45'\N'45'use\N'45'internal\N'45'solver\fR, \fB\N'45'\N'45'no\N'45'aspcud\fR Disable any external solver, and use the built\N'45'in one (this requires that opam has been compiled with a built\N'45'in solver)\N'46' .TP 4 \fB\N'45'v\fR, \fB\N'45'\N'45'verbose\fR Be more verbose\N'46' One \fB\N'45'v\fR shows all package commands, repeat to also display commands called internally (e\N'46'g\N'46' \fItar\fR, \fIcurl\fR, \fIpatch\fR etc\N'46') Repeating \fIn\fR times is equivalent to setting \fB$OPAMVERBOSE\fR to "\fIn\fR"\N'46' .TP 4 \fB\N'45'\N'45'version\fR Show version information\N'46' .TP 4 \fB\N'45'w\fR, \fB\N'45'\N'45'working\N'45'dir\fR Whenever updating packages that are bound to a local, version\N'45'controlled directory, update to the current working state of their source instead of the last committed state, or the ref they are pointing to\N'46' This only affects packages explicitly listed on the command\N'45'line\N'46' .TP 4 \fB\N'45'y\fR, \fB\N'45'\N'45'yes\fR Answer yes to all yes/no questions without prompting\N'46' This is equivalent to setting \fB$OPAMYES\fR to "true"\N'46' .SH ENVIRONMENT VARIABLES .P Opam makes use of the environment variables listed here\N'46' Boolean variables should be set to "0", "no", "false" or the empty string to disable, "1", "yes" or "true" to enable\N'46' .P \fIOPAMCOLOR\fR, when set to \fIalways\fR or \fInever\fR, sets a default value for the \N'45'\N'45'color option\N'46' .P \fIOPAMCRITERIA\fR specifies user \fIpreferences\fR for dependency solving\N'46' The default value depends on the solver version, use `config report` to know the current setting\N'46' See also option \N'45'\N'45'criteria .P \fIOPAMCURL\fR can be used to select a given \N'39'curl\N'39' program\N'46' See \fIOPAMFETCH\fR for more options\N'46' .P \fIOPAMDEBUG\fR see options `\N'45'\N'45'debug\N'39' and `\N'45'\N'45'debug\N'45'level\N'39'\N'46' .P \fIOPAMDOWNLOADJOBS\fR sets the maximum number of simultaneous downloads\N'46' .P \fIOPAMERRLOGLEN\fR sets the number of log lines printed when a sub\N'45'process fails\N'46' 0 to print all\N'46' .P \fIOPAMEXTERNALSOLVER\fR see option `\N'45'\N'45'solver\N'39'\N'46' .P \fIOPAMFETCH\fR specifies how to download files: either `wget\N'39', `curl\N'39' or a custom command where variables \fB%{url}%\fR, \fB%{out}%\fR, \fB%{retry}%\fR, \fB%{compress}%\fR and \fB%{checksum}%\fR will be replaced\N'46' Overrides the \N'39'download\N'45'command\N'39' value from the main config file\N'46' .P \fIOPAMJOBS\fR sets the maximum number of parallel workers to run\N'46' .P \fIOPAMJSON\fR log json output to the given file (use character `%\N'39' to index the files) .P \fIOPAMLOCK\fR see option `\N'45'\N'45'lock\N'39'\N'46' .P \fIOPAMNOAUTOUPGRADE\fR disables automatic internal upgrade of repositories in an earlier format to the current one, on \N'39'update\N'39' or \N'39'init\N'39'\N'46' .P \fIOPAMKEEPLOGS\fR tells opam to not remove some temporary command logs and some backups\N'46' This skips some finalisers and may also help to get more reliable backtraces .P \fIOPAMLOCKRETRIES\fR sets the number of tries after which OPAM gives up acquiring its lock and fails\N'46' <= 0 means infinite wait\N'46' .P \fIOPAMNO\fR answer no to any question asked\N'46' .P \fIOPAMNOASPCUD\fR see option `\N'45'\N'45'no\N'45'aspcud\N'39'\N'46' .P \fIOPAMNOSELFUPGRADE\fR see option `\N'45'\N'45'no\N'45'self\N'45'upgrade\N'39'\N'46' .P \fIOPAMPINKINDAUTO\fR sets whether version control systems should be detected when pinning to a local path\N'46' Enabled by default since 1\N'46'3\N'46'0\N'46' .P \fIOPAMREQUIRECHECKSUMS\fR Enables option `\N'45'\N'45'require\N'45'checksums\N'39' when available (e\N'46'g\N'46' for `opam install`)\N'46' .P \fIOPAMRETRY\fR sets the number of tries before failing downloads\N'46' .P \fIOPAMROOT\fR see option `\N'45'\N'45'root\N'39'\N'46' This is automatically set by `opam env \N'45'\N'45'root=DIR \N'45'\N'45'set\N'45'root\N'39'\N'46' .P \fIOPAMROOTISOK\fR don\N'39't complain when running as root\N'46' .P \fIOPAMSAFE\fR see option `\N'45'\N'45'safe\N'39' .P \fIOPAMSKIPVERSIONCHECKS\fR bypasses some version checks\N'46' Unsafe, for compatibility testing only\N'46' .P \fIOPAMSOLVERTIMEOUT\fR change the time allowance of the solver\N'46' Default is 60\N'46'0, set to 0 for unlimited\N'46' Note that all solvers may not support this option\N'46' .P \fIOPAMSTATUSLINE\fR display a dynamic status line showing what\N'39's currently going on on the terminal\N'46' (one of one of `always\N'39', `never\N'39' or `auto\N'39') .P \fIOPAMSWITCH\fR see option `\N'45'\N'45'switch\N'39'\N'46' Automatically set by `opam env \N'45'\N'45'switch=SWITCH \N'45'\N'45'set\N'45'switch\N'39'\N'46' .P \fIOPAMUPGRADECRITERIA\fR specifies user \fIpreferences\fR for dependency solving when performing an upgrade\N'46' Overrides \fIOPAMCRITERIA\fR in upgrades if both are set\N'46' See also option \N'45'\N'45'criteria .P \fIOPAMUSEINTERNALSOLVER\fR see option `\N'45'\N'45'use\N'45'internal\N'45'solver\N'39'\N'46' .P \fIOPAMUTF8\fR use UTF8 characters in output (one of one of `always\N'39', `never\N'39' or `auto\N'39')\N'46' By default `auto\N'39', which is determined from the locale)\N'46' .P \fIOPAMUTF8MSGS\fR use extended UTF8 characters (camels) in opam messages\N'46' Implies \fIOPAMUTF8\fR\N'46' This is set by default on OSX only\N'46' .P \fIOPAMVAR_var\fR overrides the contents of the variable \fIvar\fR when substituting `%{var}%` strings in `opam` files\N'46' .P \fIOPAMVAR_package_var\fR overrides the contents of the variable \fIpackage:var\fR when substituting `%{package:var}%` strings in `opam` files\N'46' .P \fIOPAMVERBOSE\fR see option `\N'45'\N'45'verbose\N'39'\N'46' .P \fIOPAMYES\fR see option `\N'45'\N'45'yes\N'39'\N'46' .SH EXIT STATUS .P As an exception to the following, the `exec\N'39' command returns 127 if the command was not found or couldn\N'39't be executed, and the command\N'39's exit value otherwise\N'46' .TP 4 0 Success, or true for boolean queries\N'46' .TP 4 1 False\N'46' Returned when a boolean return value is expected, e\N'46'g\N'46' when running with \fB\N'45'\N'45'check\fR, or for queries like \fBopam lint\fR\N'46' .TP 4 2 Bad command\N'45'line arguments, or command\N'45'line arguments pointing to an invalid context (e\N'46'g\N'46' file not following the expected format)\N'46' .TP 4 5 Not found\N'46' You requested something (package, version, repository, etc\N'46') that couldn\N'39't be found\N'46' .TP 4 10 Aborted\N'46' The operation required confirmation, which wasn\N'39't given\N'46' .TP 4 15 Could not acquire the locks required for the operation\N'46' .TP 4 20 There is no solution to the user request\N'46' This can be caused by asking to install two incompatible packages, for example\N'46' .TP 4 30 Error in package definition, or other metadata files\N'46' Using \fB\N'45'\N'45'strict\fR raises this error more often\N'46' .TP 4 31 Package script error\N'46' Some package operations were unsuccessful\N'46' This may be an error in the packages or an incompatibility with your system\N'46' This can be a partial error\N'46' .TP 4 40 Sync error\N'46' Could not fetch some remotes from the network\N'46' This can be a partial error\N'46' .TP 4 50 Configuration error\N'46' Opam or system configuration doesn\N'39't allow operation, and needs fixing\N'46' .TP 4 60 Solver failure\N'46' The solver failed to return a sound answer\N'46' It can be due to a broken external solver, or an error in solver configuration\N'46' .TP 4 99 Internal error\N'46' Something went wrong, likely due to a bug in opam itself\N'46' .TP 4 130 User interrupt\N'46' SIGINT was received, generally due to the user pressing Ctrl\N'45'C\N'46' .SH FURTHER DOCUMENTATION .P See https://opam\N'46'ocaml\N'46'org/doc\N'46' .SH AUTHORS .P Vincent Bernardoff .sp -1 .P Raja Boujbel .sp -1 .P Roberto Di Cosmo .sp -1 .P Thomas Gazagnaire .sp -1 .P Louis Gesbert .sp -1 .P Fabrice Le Fessant .sp -1 .P Anil Madhavapeddy .sp -1 .P Guillem Rieu .sp -1 .P Ralf Treinen .sp -1 .P Frederic Tuong .SH BUGS .P Check bug reports at https://github\N'46'com/ocaml/opam/issues\N'46'