defluffing Portfiles (port lint)

Anders F Björklund afb at macports.org
Sun Jul 1 01:19:47 PDT 2007


Apparently one of the oldest feature requests around...
http://trac.macports.org/projects/macports/ticket/463

I created a basic implementation, for later expansion:
http://trac.macports.org/projects/macports/ticket/12211


It does the following:
- implicitly checks that Tcl syntax is reasonable
- checks the document for invalid UTF-8 sequences
- checks for blank newlines after certain fields
- checks for trailing whitespace before newline
- checks that PortSystem is present (but only once)
- checks that all required variables are present
- checks for maintainer darwinports at opendarwin.org

Results are divided into (fatal) errors and warnings,
while passed checks can be viewed using the -v flag.


There are several other Portfile checks left TODO,
but at least it's a start in the right direction...

Note: it currently *only* checks the Portfile, and
not the files directory nor the generated destroot.

--anders

PS. Of course it is inspired by FreeBSD portlint(1)
http://www.freebsd.org/cgi/man.cgi? 
query=portlint&sektion=1&manpath=FreeBSD+Ports




More information about the macports-dev mailing list