Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #12211 (closed enhancement: fixed)

Opened 16 months ago

Last modified 14 months ago

RFE: "lint" action for Portfile verification

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

Description

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

macports-portlint.patch (8.9 kB) - added by afb@… 16 months ago.
macports-portlint.patch

Change History

Changed 16 months ago by afb@…

macports-portlint.patch

Changed 15 months ago by afb@…

  • milestone set to 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

Changed 15 months ago by jmpp@…

  • milestone changed from Needs developer review to MacPorts base bugs

Milestone Needs developer review deleted

Changed 14 months ago by nox@…

  • priority changed from Expected to Normal
  • summary changed from "lint" action for Portfile verification to RFE: "lint" action for Portfile verification
  • milestone changed from MacPorts base bugs to MacPorts base enhancements

This is a duplicate of #463.

Changed 14 months 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...

Changed 14 months ago by afb@…

Applied in r28170

Changed 14 months ago by afb@…

  • status changed from new to closed
  • resolution set to fixed

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

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

Note: See TracTickets for help on using tickets.