This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [COMMIT] Improve coding standard in dbxread.c


> Date: Sat, 20 Nov 2004 18:41:00 +0100 (CET)
> From: Mark Kettenis <mark.kettenis@xs4all.nl>
> CC: gdb-patches@sources.redhat.com
> 
> The coding standards say:
> 
> "Also, please write complete sentences and capitalize the first word."

standards.texi also has this example:

     #ifdef foo
       ...
     #else /* not foo */
       ...
     #endif /* not foo */
     #ifdef foo
       ...
     #endif /* foo */

where the comments are clearly not full sentences and don't end with a
period.

> Now indeed it is debatable whether the comments above are complete
> sentences; there's no verb in them.  But these comments feel very
> sentence-like.

I'm okay with making them full sentences, if you think it's better
than what I suggested.  But please let's not do half a job; let's at
least have correct English in comments.  What's there now is not
correct English.  Before your changes, we at least could say no one
cared to fix those comments, but now we don't have that excuse
anymore ;-).

> Anyway, I was aiming for some consistency here.

Consistency is important, but correct English is also important.

>    Some of the other changes simply reformat comments to break the line
>    at a different column.  Do we have a canonical column number for that,
>    and if we do, what is its value?
> 
> I always consider the GNU indentation style provided by emacs to be an
> implementation of the canonical formatting style.

Emacs lets you customize the column where it breaks a line that is too
long.  While your setup seems to use the default value, someone else
might not, or could use something other than Emacs.

So if we want to have consistent formatting, let's agree on where long
lines should be wrapped.

> The canonical column therefore would be 32.

That's where comments start; I meant the column where they are
wrapped.  The default is 70 (zero-based).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]