Opened 6 years ago

Last modified 3 years ago

#56345 new enhancement

Make it easier to determine which ports have lint problems

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.4.99
Keywords: Cc: cooljeanius (Eric Gallager)
Port:

Description

port lint does not make it easy to display output only for ports that have lint warnings or errors and to be silent about those that don't, or to construct a list of the names of such ports. For example:

$ port lint maintainer:jberry
--->  Verifying Portfile for cronolog-devel
Warning: no license set
--->  0 errors and 1 warnings found.
--->  Verifying Portfile for dovecot
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for mrtg
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for mrtg-ping-probe
Warning: Line 3 has trailing whitespace before newline
Warning: Patchfile mrtg-ping-probe.patch does not follow the source patch naming policy "patch-*.diff"
--->  0 errors and 2 warnings found.
--->  Verifying Portfile for tag
Warning: Line 12 seems to hardcode the version number, consider using ${version} instead
Warning: Line 31 seems to hardcode the version number, consider using ${version} instead
--->  0 errors and 2 warnings found.

There is a lot of superfluous output about ports that don't have problems. This is inconvenient if one is trying to find lint problems in a large number of ports, such as all of the ports a maintainer maintains, or even the entire set of all ports.

More useful output can be obtained with postprocessing, but it would be better if MacPorts would produce such output without postprocessing:

$ port lint maintainer:jberry 2>&1 | perl -ne 'if (/Verifying Portfile for (.+)$/) {$PORT=$1} elsif (!/\d+ errors and \d+ warnings found/) {print "$PORT: $_"}'
cronolog-devel: Warning: no license set
mrtg-ping-probe: Warning: Line 3 has trailing whitespace before newline
mrtg-ping-probe: Warning: Patchfile mrtg-ping-probe.patch does not follow the source patch naming policy "patch-*.diff"
tag: Warning: Line 12 seems to hardcode the version number, consider using ${version} instead
tag: Warning: Line 31 seems to hardcode the version number, consider using ${version} instead

Change History (1)

comment:1 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.