Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 47326: / /trunk/tools/: checkhf-v2.p
On Mon, Jan 28, 2013 at 3:21 PM, Bill Meier <wmeier@xxxxxxxxxxx> wrote:
> On 1/28/2013 2:58 PM, wmeier@xxxxxxxxxxxxx wrote:
>>
>>
>> Log:
>> Re-implemention of checkhf.pl:
>> Main objective: reduce the number of false positives.
>> Normal usage: the same as for checkhf.pl.
>>
>> For now: named checkhf-v2.pl
>>
>
> I've just committed a re-implementation of checkhf.pl and named it
> checkhf-v2.pl.
>
> I'm not really sure how to handle this type of situation:
>
> 1. Retire (delete) checkhf.pl and then commit new version
> with the same name. (It is a new program).
> (More or less completely hides the original; It's obviously
> still in the repository if you know how to find it).
>
> 2. Just commit the new version as a diff from the previous
> (essentially removing almost all the lines of the old and
> adding the new). (Keeps the history).
>
> 3. Give the re-implementation a different name.
> Keep the old in the repository.
>
> Maybe #2 is the way to go....
>
> Thoughts ?
>
> Bill
I'm perfectly happy with #2. The new script looks very nice.
Tangentially, CppCheck [1] has support for custom checks using
plugins. I've never had time to investigate properly, but I suspect
that implementing the three check scripts (checkhf, checkAPIs,
checkfiltername) as CppCheck plugins would be a major win, primarily
because we'd get real C grammar parsing for free.
Cheers,
Evan
[1] http://cppcheck.sourceforge.net/