[MacPorts Lint] Portfile Lint Errors for: dpkg

Ryan Schmidt ryandesign at macports.org
Wed Feb 6 22:52:17 PST 2008


On Feb 6, 2008, at 15:33, Landon Fuller wrote:

> On Feb 6, 2008, at 13:23, Ryan Schmidt wrote:
>
>> There is no detriment that I can discern by naming patchfiles  
>> "patch-*.diff" as port lint recommends. There is a detriment by  
>> not following this convention which has been discussed at length  
>> before on the list.
>
> There is a detriment. The patchfiles aren't syntax hilighted as C,  
> and instead are hilighted as a patch file. This is purely a matter  
> of personal preference, which is a bad reason to dictate policy.

But that's just it. It is an error to highlight a diff file as if it  
were a C file. A diff file is *not* a C file! A C compiler will not  
compile it. And a C syntax highlighter will not necessarily be able  
to syntax highlight it correctly. Your own dpkg port gives us a great  
example in patch-main_archives.c. The patch has three blocks. The  
last line of context in the second block is the first line of a  
multiline comment. The last line of the multiline comment is not  
shown, therefore the C syntax highlighter thinks the entire rest of  
the file is part of the comment. See:

http://www.ryandesign.com/tmp/patch-main_archives.c.png

I've given this rationale before, two months ago:

http://lists.macosforge.org/pipermail/macports-dev/2007-December/ 
003823.html

And two months before that:

http://lists.macosforge.org/pipermail/macports-dev/2007-October/ 
003139.html

I guess I'm repeating myself but I don't know what else to do. I feel  
like I've made all the relevant arguments already.


>> This warning has been in port lint for quite some time already.  
>> It's just now been made an automated email.
>
> Yes, and getting an e-mail about something I don't think is a  
> problem is frustrating.

Then I guess we need to decide whether it is or is not a problem, and  
if it isn't, then get rid of the port lint check for this. But I  
still think it is a problem, for all the reasons I've stated today  
and earlier, and that port lint should warn.



More information about the macports-dev mailing list