Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#12211 closed enhancement (fixed)

RFE: "lint" action for Portfile verification

Reported by: afb@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.6
Component: base Version: 1.5
Keywords: Cc:


port needs a target to verify that Portfiles are following set criteria, such as required variables or character encoding. It also helps to check that whitespace use and declaration order is uniform.

USAGE: $ sudo port lint MacPorts zlib ---> Verifying Portfile for MacPorts ---> 0 errors and 0 warnings found. ---> Verifying Portfile for zlib Warning: Line 4 should be a newline (after PortSystem) Warning: Line 16 should be a newline (after long_description) Warning: Line 33 has trailing whitespace before newline ---> 0 errors and 3 warnings found.

Attachments (1)

macports-portlint.patch (8.9 KB) - added by afb@… 13 years ago.

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by afb@…

Attachment: macports-portlint.patch added


comment:1 Changed 13 years ago by afb@…

Milestone: Needs developer review

Should be good to go, for collecting some feedback...

Opinions on script gotten so far on the mailing list:

  • tabs and whitespace in Portfiles should be free-form
  • newline after long_description might be optional ?
  • "knowing" the location of Portfile is bad practice

comment:2 Changed 13 years ago by jmpp@…

Milestone: Needs developer reviewMacPorts base bugs

Milestone Needs developer review deleted

comment:3 Changed 13 years ago by nox@…

Milestone: MacPorts base bugsMacPorts base enhancements
Priority: ExpectedNormal
Summary: "lint" action for Portfile verificationRFE: "lint" action for Portfile verification

This is a duplicate of #463.

comment:4 Changed 13 years ago by afb@…

This is not a duplicate of #463, it's the start of a fix/implementation for it.

It was requested that it was posted to Trac as a patch, rather than commited...

comment:5 Changed 13 years ago by afb@…

Applied in r28170

comment:6 Changed 13 years ago by afb@…

Resolution: fixed
Status: newclosed

Well, it's in. Enhancements should be new tickets.

(whitespace-checks and long_desc-newline removed, ignoring that knowing Portfile is "bad practice")

comment:7 Changed 11 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 1.6
Note: See TracTickets for help on using tickets.