Le 28/02/2024 à 08:32, Alexander Leidinger a écrit :
Am 2024-02-28 00:52, schrieb Hubert Tournier:
Shouldn't this make it to ports-mgmt/ as portlinter?
If it's deemed useful, I could make the port next week-end.
If you do that, I suggest to use a name which makes it clear that it
is not a replacement for portlint (which operates on 1 port), and that
makes it clear that it operates on the whole tree. Maybe
portstreelint, or portstreecheck, or ptlint, or ptcheck, or whatever,
but not "portlint*".
Hello,
You're right. I was lacking inspiration the day I named this :-)
I made a new version named portstreelint (with aliases ptlint and ptl),
which is now a Python package rather than a standalone script.
It supersedes the previous one and is located at:
https://github.com/HubTou/portstreelint
With Python's pip it can be installed with: pip install pnu-portstreelint
I also added many new checks, some inspired by the neighboring "Proposed
ports deprecation and removal policy" discussion thread.
On a freshly updated ports tree and index, it reports the following
findings:
Selected 34408 ports out of 34408 in the FreeBSD port tree, and found:
5 ports with unusual installation-prefix (warning)
338 ports with a comment string exceeding 70 characters (warning)
286 ports with an uncapitalized comment
11 ports comment ending with a dot
109 ports with a comment different between the Index and Makefile
2 ports with non existent description-file
198 ports with URL ending description-file
613 ports with description-file identical to comment
483 ports with description-file no longer than comment
10427 ports without pkg-plist/PLIST_FILES/PLIST/PLIST_SUB (info)
170 ports abusing PLIST_FILES with more than 6 entries (warning)
5 ports with a maintainer different between the Index and Makefile
34 ports referring to unofficial categories (warning)
262 ports with categories different between the Index and Makefile
1246 ports with no www-site
304 ports with an unresolvable www-site hostname
659 ports with an unaccessible www-site
2 ports with a www-site different betwwen the Index and makefile
121 ports with a BROKEN mark
39 ports with a BROKEN mark older than 180 days
232 ports with a IGNORE mark in some cases (info)
1 port with a FORBIDDEN mark
2 ports with a FORBIDDEN mark older than 90 days
114 ports with a DEPRECATED mark
13 ports with a DEPRECATED mark older than 180 days
Full refreshed reports are available at the following addresses for
those who are curious but don't want to install the tool:
https://www.frbsd.org/xch/stdout.txt
https://www.frbsd.org/xch/stderr.txt
Note that packing list check is not that much interesting as one third
of the ports tree is not using any of the ways documented in the
Porter's Handbook to list its files.
I could use some help here to make it better.
Now that this tool is a Python package, it's easier to use other Python
libraries.
I already created a dependency on my vuxml library
(https://github.com/HubTou/vuxml), which I will shortly use to add
vulnerable ports reporting.
I'll then study how to check unavailable distfiles (building their name
in all the ports cases being the hardest part).
Best regards,
Hubert