Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Coding style and example dissector

From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Wed, 18 Dec 2013 12:29:03 -0500
On 12/18/2013 7:52 AM, Joerg Mayer wrote:
On Tue, Dec 17, 2013 at 05:55:30PM -0800, Michael Lum wrote:
Could someone please write a coding style section for the new dissectors and perhaps
point to the best example dissector.

doc/README.developer last sections (5. White space convention) more or less
is what we have.

Currently, many of the dissectors I have submitted are having arbitrary white space/style
changes made.

I completely understand changes, for bugs, API changes, and warnings missed because of cross-platform
builds.

But I don't understand the need to change FROM a consistent style to some other style.

Maybe the consistent form was not apparent to the person make these changes.
Adding a mode-line seems like a good way to prevent this sort of "arbitrary"
changes.

If you are the de facto "maintainer" of these dissectors and you don't feel
comfortable with these changes then maybe open a bug and ask for these changes
to be reverted - you have to feel comfortable with your code.
In case you can live with (more or less) any coding style as seems
to be the case for you then it's "only" time someone else might have spent doing
other things but no harm was done and no revert is necessary.

Ciao
       Jörg


Michael:

You are probably referring to various changes I've made.

As I make updates in dissectors, I've gotten in the habit of doing a once-over and making changes related, to a large extent, to whitespace (field alignment, consistent indentation, trailing whitespace, etc) but which can/do shade over into changes in style.

Looking back, (and based upon some other recent comments) I think I need to "slow down" a bit.

I'm happy to revert changes upon request.

Bill