-
Notifications
You must be signed in to change notification settings - Fork 0
/
pkglint.1
148 lines (148 loc) · 4.38 KB
/
pkglint.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
.\" $NetBSD: pkglint.1,v 1.65 2020/01/26 19:35:22 rillig Exp $
.\" From FreeBSD: portlint.1,v 1.8 1997/11/25 14:53:14 itojun Exp
.\"
.\" Copyright (c) 1997 by Jun-ichiro Itoh <[email protected]>.
.\" All Rights Reserved. Absolutely no warranty.
.\"
.\" Roland Illig <[email protected]>, 2004, 2005.
.\" Thomas Klausner <[email protected]>, 2012.
.\" Roland Illig <[email protected]>, 2015-2020.
.\"
.Dd July 16, 2024
.Dt PKGLINT 1
.Os
.Sh NAME
.Nm pkglint
.Nd static analyzer for pkgsrc packages
.Sh SYNOPSIS
.Nm pkglint
.Op Fl options
.Op Ar dir ...
.Sh DESCRIPTION
.Nm
attempts to detect features of the named pkgsrc packages that are likely
to be bugs, or that are simply deprecated.
.Pp
.\" =======================================================================
.Ss Options
.Bl -tag -width 18n
.It Fl C{[no-]check,...}
Enable or disable specific checks.
For a list of checks, see below.
.It Fl d Ns | Ns Fl Fl debug
Enable or disable verbose log for debugging pkglint.
.It Fl e Ns | Ns Fl Fl explain
Print verbose explanations for diagnostics.
.It Fl F Ns | Ns Fl Fl autofix
Repair some of the warnings automatically.
.It Fl g Ns | Ns Fl Fl 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.
.It Fl h Ns | Ns Fl Fl help
Show the summary of command line options, then exit.
.It Fl I
Show the
.Pa Makefile
that is constructed by including all the files that
are slurped in via
.Ql .include
directives.
This flag is mainly for debugging.
.It Fl i Ns | Ns Fl Fl import
Check if a package is ready to be imported into pkgsrc.
This is especially useful for packages from the pkgsrc-wip project.
.It Fl n Ns | Ns Fl Fl network
Enable checks that require network access,
for example to check whether the package homepage is reachable.
.It Fl o Ns | Ns Fl Fl only Ar substring
Only handle those diagnostics that have
.Ar substring
in their text.
This is useful in combination with
.Fl Fl autofix
and
.Fl Fl recursive,
to fix only a single kind of warning in a large number of files.
.It Fl q Ns | Ns Fl Fl quiet
Don't print the errors and warnings summary at the end.
.It Fl r Ns | Ns Fl Fl recursive
Check subdirectories, too.
The subdirectories are those that are mentioned in a
.Ql SUBDIR+=
line.
.It Fl s Ns | Ns Fl Fl 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
.Fl f Ns | Ns Fl Fl show-autofix
option.
.It Fl V Ns | Ns Fl Fl version
Print the current
.Nm
version number and exit.
.It Fl W{[no-]warn,...}
Enable or disable specific warnings.
For a list of warnings, see below.
.El
.\" =======================================================================
.Ss Checks
.Bl -tag -width 18n
.It Cm all
Enable all checks.
.It Cm none
Disable all checks.
.It Cm [no-]global
Check inter-package consistency for distfile hashes and used licenses.
.El
.\" =======================================================================
.Ss Warnings
.Bl -tag -width 18n
.It Cm all
Enable all warnings.
.It Cm none
Disable all warnings.
.It Cm [no-]error
Treat warnings as errors; only affects the exit status.
.It Cm [no-]extra
Emit some additional warnings that are not enabled by default.
.It Cm [no-]perm
Warn if a variable is used or modified outside its specified scope.
.It Cm [no-]quoting
Warn for possibly invalid quoting of make variables in shell programs
and shell variables themselves.
.El
.\" =======================================================================
.Ss Other arguments
.Bl -tag -width 18n
.It Ar dir ...
The pkgsrc directories to be checked.
If omitted, the current directory is checked.
.El
.Sh FILES
.Bl -tag -width pkgsrc/mk/* -compact
.It Pa pkgsrc/mk/*
Files from the pkgsrc infrastructure.
.El
.Sh EXAMPLES
.Bl -tag -width Fl
.It Ic pkglint \&.
Checks the package in the current directory.
.It Ic pkglint \-Wall /usr/pkgsrc/devel
Checks the category Makefile and reports any warnings it can find.
.El
.Sh DIAGNOSTICS
Diagnostics are written to the standard output.
.Bl -tag -width "WARN: foobaa"
.It ERROR: ...
Errors should be fixed before a package is committed to pkgsrc.
.It WARN: ...
Warnings generally should be fixed, but they are not as critical as
errors.
.El
.Sh AUTHORS
.An Roland Illig Aq Mt [email protected]
.Sh BUGS
If you don't understand the messages, feel free to ask the author or
on the
mailing list.