Auto lint reports

Ryan Schmidt ryandesign at macports.org
Wed Apr 28 13:37:02 PDT 2010


On Apr 28, 2010, at 13:22, Scott Haneda wrote:

> Hello, I just received 4 lint reports from an automated system in MacPorts.  Here is one example:
> 
>    Change: http://trac.macports.org/changeset/67067
>    Portfile: p5-file-readbackwards
> 
>    Warning: Line 19 seems to hardcode the version number, consider using 
>    ${version} instead

[snip]

> A couple questions.  Tab stops are set to 8 now, which I never would have done.  How does this happen?  What is the preferred MacPorts tab stops to use?  If I change it, I assume I should do so in two patches, one to fix the version, and one to fix the tab stops?
> 
> Is this the correct way to fix this?  Do the p5's usually get a livecheck as well?  Or is there something built into MP's to make it happen, as a port livecheck on this p5 seems to tell me it is up to date with the -d flag in use.

[snip]

> Thanks, once I know the right way to deal with this, I will send in the patches for each notification I received.


You received these notifications because I made changes to hundreds of p5 ports yesterday to add the new supported_archs attribute available in MacPorts trunk to indicate that these ports do not install any architecture-specific files. It would have taken forever to get approval from hundreds of different maintainers so for the good of the project I just went ahead and committed the changes.


The whitespace of the port has not changed since you originally submitted it:

http://trac.macports.org/ticket/18123


The preferred whitespace of files in MacPorts is spaces with indentations at 4 spaces per virtual tab:

http://guide.macports.org/#development.practices.portstyle

If you'd like to change the whitespace of your ports, you can file tickets or just let me know; changing tabs to spaces is a simple matter -- for example, to convert 8-space tabs to spaces, I use:

expand -t 8 Portfile > a
mv a Portfile

So if you want to have the tabs changed to spaces in each port, and want to save yourself the bother of filing tickets and attaching patches, let me know and I can run those commands for you.

Adding the modeline is also a good idea at this point to indicate the port's compliance with the preferred whitespace style.


The message about hardcoding the version number is there because in the case of simple version updates, we want maintainers to only have to update the version in one place, and the checksums. Hardcoding the version in other places in the portfile makes for more work for you when updating the version, or makes for things you'll forget to update.

In a subsequent commit, I already removed the homepage line from those ports of yours where I received this message, since the default homepage line provided by the perl5 portgroup seemed to be adequate.


The perl5 portgroup also provides a default livecheck, which is why you found the livecheck already works. You can read the perl5 portgroup file to see everything that it does for you:

http://trac.macports.org/browser/trunk/dports/_resources/port1.0/group/perl5-1.0.tcl




More information about the macports-dev mailing list