Bug#485705: lintian: doesn't properly detect comma in control file email address quoted strings
On 2011-11-20 21:39, Jakub Wilk wrote:
> * Niels Thykier <niels@thykier.net>, 2011-11-19, 09:04:
>> It breaks testset/foo++ which has some weird uploaders. Basically it
>> appears to read all of
>>
>> Yama@gotchi, Josip, I am afraid of spam and think this helps
>> <no_spam_please AT debian.org>
>>
>> as a single uploader. I strongly suspect this will break our
>> "uploader has no email"-check (with the exception of said uploader
>> being the last uploader). It probably also complicates some of our
>> other "broken uploader" checks.
>
> For the record: I attached diff of test output.
>
> To be honest, this test is quite contrived and I don't believe that
> these kind of mistakes in Uploaders happen often enough to care about
> them in lintian.
>
Hey,
As mentioned over IRC, one of my issues with this patch is that appears
to break uploader-address-missing and uploader-name-missing (possible
exception being the "last uploader"[1]).
If we go with the patch I think we should revisit or remove these two
tags.
I think the hardest case is that "missing address" case because the
">\K\s*,"-split makes it imposible to distinguish "Person1, Person2
<email>" from "Person, 1 <email>" without heuristics.
For the missing-name thing - I suspect that a name containing @ is
usually always a mistake. So...
some@email.com, Name <another@email.com>, Some Person <third@email.com>
In this case, the new regex would split into two:
1: some@email.com, Name <another@email.com>
2: Some Person <third@email.com>
Using a regex like "\@\S+\K\s*,\s*" we can "re-split" $1 and check both
parts.
Anyone have any ideas/suggestions or preferences on how to solve this?
~Niels
[1] Notice that fields-uploaders passes the test, while foo++ fails
despite both have an "email-less" uploader.
Reply to: