PKGLINT(1)

NAME
pkglint - static analyzer for pkgsrc packages

SYNOPSIS
pkglint [-options] [dir ...]

DESCRIPTION
pkglint attempts to detect features of the named pkgsrc packages that are likely to be bugs, or that are simply deprecated.

  Options

-C{[no-]check,...}
    Enable or disable specific checks. For a list of checks, see below.

-d|- -debug
    Enable or disable verbose log for debugging pkglint.

-e|- -explain
    Print verbose explanations for diagnostics.

-F|- -autofix
    Repair some of the warnings automatically.

-g|- -gcc-output-format
    Use a format for the diagnostics that is understood by most programs, especially editors, so they can provide a point-and-goto interface.

-h|- -help
    Show the summary of command line options, then exit.

-I  Show the Makefile that is constructed by including all the files that are slurped in via ‘.include’ directives. This flag is mainly for debugging.

-i|- -import
    Check if a package is ready to be imported into pkgsrc. This is especially useful for packages from the pkgsrc-wip project.

-n|- -network
    Enable checks that require network access, for example to check whether the package homepage is reachable.

-o|- -only substring
    Only handle those diagnostics that have substring in their text. This is useful in combination with - -autofix and - -recursive, to fix only a single kind of warning in a large number of files.

-q|- -quiet
    Don't print the errors and warnings summary at the end.

-r|- -recursive
    Check subdirectories, too. The subdirectories are those that are mentioned in a ‘SUBDIR+=’ line.

-s|- -source
    For all diagnostics having file and line number information, show the source code along with the diagnostics. This is especially useful together with the -f|- -show-autofix option.

-V|- -version
    Print the current pkglint version number and exit.

-W{[no-]warn,...}
    Enable or disable specific warnings. For a list of warnings, see below.

  Checks

all Enable all checks.

none
    Disable all checks.

[no-]global
    Check inter-package consistency for distfile hashes and used licenses.

  Warnings

all Enable all warnings.

none
    Disable all warnings.

[no-]error
    Treat warnings as errors; only affects the exit status.

[no-]extra
    Emit some additional warnings that are not enabled by default.

[no-]perm
    Warn if a variable is used or modified outside its specified scope.

[no-]quoting
    Warn for possibly invalid quoting of make variables in shell programs and shell variables themselves.

  Other arguments

dir ...
    The pkgsrc directories to be checked. If omitted, the current directory is checked.

FILES
pkgsrc/mk/*
    Files from the pkgsrc infrastructure.

EXAMPLES

pkglint.
    Checks the package in the current directory.

pkglint -Wall /usr/pkgsrc/devel
    Checks the category Makefile and reports any warnings it can find.

DIAGNOSTICS
Diagnostics are written to the standard output.

ERROR: ...
    Errors should be fixed before a package is committed to pkgsrc.

WARN: ...
    Warnings generally should be fixed, but they are not as critical as errors.

AUTHORS
Roland Illig <rillig@NetBSD.org>

BUGS
If you don't understand the messages, feel free to ask the author or on the <pkgsrc-users@pkgsrc.org> mailing list.