PKGLINT(1) General Commands Manual PKGLINT(1) NNAAMMEE ppkkgglliinntt -- static analyzer for pkgsrc packages SSYYNNOOPPSSIISS ppkkgglliinntt [--ooppttiioonnss] [_d_i_r _._._.] DDEESSCCRRIIPPTTIIOONN ppkkgglliinntt attempts to detect features of the named pkgsrc packages that are likely to be bugs, or that are simply deprecated. OOppttiioonnss --CC{{[[nnoo--]]cchheecckk,,......}} Enable or disable specific checks. For a list of checks, see below. --DD{{[[nnoo--]]ddeebbuugg,,......}} Enable or disable debugging categories. For a list of categories, see below. --FF|----aauuttooffiixx Repair trivial things automatically. --II Show the _M_a_k_e_f_i_l_e that is constructed by including all the files that are slurped in via `.include' directives. This flag is mainly for debugging. --RR|----rrccssiiddssttrriinngg Allow other RCS Id strings than NetBSD. Multiple strings may be concatenated with `|'. --VV|----vveerrssiioonn Print the current ppkkgglliinntt version number and exit. --WW{{[[nnoo--]]wwaarrnn,,......}} Enable or disable specific warnings. For a list of warnings, see below. --ee|----eexxppllaaiinn Print further explanations for diagnostics. Sometimes the reasons for diagnostics are not obvious and need further explanation. --gg|----ggcccc--oouuttppuutt--ffoorrmmaatt Use a format for the diagnostics that is understood by most programs, especially editors, so they can provide a point-and-goto interface. --hh|----hheellpp Show the summary of command line options, then exit. --ii|----iimmppoorrtt Check if a package is ready to be imported into pkgsrc. This is especially useful for packages from the pkgsrc-wip project. --qq|----qquuiieett Don't print the errors and warnings summary before terminating. --rr|----rreeccuurrssiivvee Check subdirectories, too. The subdirectories are those that are mentioned in a `SUBDIR+=' line. --ss|----ssoouurrccee For all diagnostics having file and line number information, show the source code along with the diagnostics. CChheecckkss aallll Enable all checks. nnoonnee Disable all checks. [[nnoo--]]AALLTTEERRNNAATTIIVVEESS Check the alternatives file. [[nnoo--]]DDEESSCCRR Check the DESCR file. [[nnoo--]]IINNSSTTAALLLL Check the INSTALL and DEINSTALL scripts. [[nnoo--]]MMaakkeeffiillee Check the package Makefile, including all included files. [[nnoo--]]MMEESSSSAAGGEE Check MESSAGE files. [[nnoo--]]PPLLIISSTT Check PLIST files. [[nnoo--]]bbll33 Check buildlink3 Makefiles. [[nnoo--]]ddiissttiinnffoo Check the distinfo file. [[nnoo--]]eexxttrraa Check remaining files in the package directory. [[nnoo--]]mmkk Check Makefile fragments besides buildlink3. [[nnoo--]]ppaattcchheess Check the pkgsrc specific patch files. DDeebbuuggggiinngg OOppttiioonnss aallll Enable all debugging options. nnoonnee Disable all debugging options. [[nnoo--]]iinncclluuddee Show the pathnames of the included Makefiles. [[nnoo--]]mmiisscc Some debugging stuff that hasn't made it into its own category. [[nnoo--]]ppaattcchheess Print the states of the patch file parser. [[nnoo--]]qquuoottiinngg Additional information about why variables should be quoted or not. [[nnoo--]]sshheellll Parser information from the shell word and the shell command parsers. [[nnoo--]]ttoooollss Additional information about the tools from the tools framework. [[nnoo--]]ttrraaccee Print the names of subroutines and their arguments as they are entered. [[nnoo--]]uunncchheecckkeedd Show the things that pkglint cannot currently check. These are mostly due to unresolved make variables. [[nnoo--]]uunnuusseedd Show which variables are detected as used, and so will not generate an ``unused variable'' warning. [[nnoo--]]vvaarrttyyppeess Additional information about the variable types. [[nnoo--]]vvaarruussee Information about the contexts in which variables are used. WWaarrnniinnggss aallll Enable all warnings. nnoonnee Disable all warnings. [[nnoo--]]aabbssnnaammee Warn if a file contains an absolute pathname. [[nnoo--]]ddiirreeccttccmmdd Warn if a system command name is used instead of a variable (e.g. sed instead of ${SED}). [[nnoo--]]eexxttrraa Emit some additional warnings that are not enabled by default, for whatever reason. [[nnoo--]]oorrddeerr Warn if Makefile variables are not in the preferred order. [[nnoo--]]ppeerrmm Warn if a variable is used or defined outside its specified scope. The available permissions are: append append something using += default set a default value using ?= preprocess use a variable during preprocessing runtime use a variable at runtime set set a variable using :=, =, != unknown permissions for this variable currently not known A `?' means that it is not yet clear which permissions are allowed and which aren't. [[nnoo--]]pplliisstt--ddeepprr Warn if deprecated pathnames are used in _P_L_I_S_T files. This warning is disabled by default. [[nnoo--]]pplliisstt--ssoorrtt Warn if items of a PLIST file are not sorted alphabetically. This warning is disabled by default. [[nnoo--]]qquuoottiinngg Warn for possibly invalid quoting of make variables in shell programs and shell variables themselves. [[nnoo--]]ssppaaccee Emit notes for inconsistent use of white-space. [[nnoo--]]ssttyyllee Warn for stylistic issues that don't affect the build process. [[nnoo--]]ttyyppeess Warn for some _M_a_k_e_f_i_l_e variables if their assigned values do not match their type. [[nnoo--]]vvaarroorrddeerr Warn if the variables in a package _M_a_k_e_f_i_l_es are not ordered in the way it is described the pkgsrc guide. OOtthheerr aarrgguummeennttss _d_i_r _._._. The pkgsrc directories to be checked. If omitted, the current directory is checked. FFIILLEESS _p_k_g_s_r_c_/_m_k_/_* Files from the pkgsrc infrastructure. EEXXAAMMPPLLEESS ppkkgglliinntt --CCnnoonnee,,ppaattcchheess .. Checks the patches of the package in the current directory. ppkkgglliinntt --WWaallll //uussrr//ppkkggssrrcc//ddeevveell Checks the category Makefile and reports any warnings it can find. ppkkgglliinntt --rr --RR ''NNeettBBSSDD||IIdd'' //uussrr//ppkkggssrrcc Check the whole pkgsrc tree while allowing `NetBSD' or `Id' as the RCS Id. DDIIAAGGNNOOSSTTIICCSS 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. AAUUTTHHOORRSS Roland Illig BBUUGGSS Many more checks could be added. If you don't understand the messages, feel free to ask on the mailing list. NetBSD 6.99.8 July 14, 2012 NetBSD 6.99.8