* FYI: My Coding Style cheat-sheet on the Wiki
@ 2011-01-06 8:32 Joel Brobecker
2011-01-06 12:38 ` Hui Zhu
2011-01-06 13:58 ` Yao Qi
0 siblings, 2 replies; 4+ messages in thread
From: Joel Brobecker @ 2011-01-06 8:32 UTC (permalink / raw)
To: gdb-patches
This is something I started writing down in a text file, and thought
I'd share. This is unofficial, and incomplete, and there is a big
disclaimer about it.
The intention for this document is to be a cheat-sheet in the situations
where you know there is a rule about something, but can't remember what
exactly it says. Instead of having to grep 2 documents (the GCS, and
our GDB Internal's manual), the cheat-sheet is meant to be a possible
help.
I hope that it helps others. Everyone should feel free to update
and enhance this document, if they find it useful. I hope that
the cheap-to-update simplicity of the Wiki will encourage anyone
to do so.
http://sourceware.org/gdb/wiki/JoelsCodingStyleCheatSheet
This page is also accessible from the HomePage.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FYI: My Coding Style cheat-sheet on the Wiki
2011-01-06 8:32 FYI: My Coding Style cheat-sheet on the Wiki Joel Brobecker
@ 2011-01-06 12:38 ` Hui Zhu
2011-01-06 13:58 ` Yao Qi
1 sibling, 0 replies; 4+ messages in thread
From: Hui Zhu @ 2011-01-06 12:38 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
I suggest we make a script that can check the format of the patch and
tell which line's format is not right. Like in Linux kernel
scripts/checkpatch.pl
Thanks,
Hui
On Thu, Jan 6, 2011 at 16:32, Joel Brobecker <brobecker@adacore.com> wrote:
> This is something I started writing down in a text file, and thought
> I'd share. This is unofficial, and incomplete, and there is a big
> disclaimer about it.
>
> The intention for this document is to be a cheat-sheet in the situations
> where you know there is a rule about something, but can't remember what
> exactly it says. Instead of having to grep 2 documents (the GCS, and
> our GDB Internal's manual), the cheat-sheet is meant to be a possible
> help.
>
> I hope that it helps others. Everyone should feel free to update
> and enhance this document, if they find it useful. I hope that
> the cheap-to-update simplicity of the Wiki will encourage anyone
> to do so.
>
> http://sourceware.org/gdb/wiki/JoelsCodingStyleCheatSheet
>
> This page is also accessible from the HomePage.
>
> --
> Joel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FYI: My Coding Style cheat-sheet on the Wiki
2011-01-06 8:32 FYI: My Coding Style cheat-sheet on the Wiki Joel Brobecker
2011-01-06 12:38 ` Hui Zhu
@ 2011-01-06 13:58 ` Yao Qi
2011-01-06 14:17 ` Joel Brobecker
1 sibling, 1 reply; 4+ messages in thread
From: Yao Qi @ 2011-01-06 13:58 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On 01/06/2011 04:32 PM, Joel Brobecker wrote:
> I hope that it helps others. Everyone should feel free to update
> and enhance this document, if they find it useful. I hope that
> the cheap-to-update simplicity of the Wiki will encourage anyone
> to do so.
>
> http://sourceware.org/gdb/wiki/JoelsCodingStyleCheatSheet
> /* The maximum number of tasks known to the Ada runtime */
> static const int MAX_NUMBER_OF_KNOWN_TASKS = 1000;
What is the expected/correct format of comment here? Isn't ended with
period and two spaces? If we still follow the "period and two spaces"
schema here, I'll update this wikipage and source code to reflect this.
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FYI: My Coding Style cheat-sheet on the Wiki
2011-01-06 13:58 ` Yao Qi
@ 2011-01-06 14:17 ` Joel Brobecker
0 siblings, 0 replies; 4+ messages in thread
From: Joel Brobecker @ 2011-01-06 14:17 UTC (permalink / raw)
To: Yao Qi; +Cc: gdb-patches
> > /* The maximum number of tasks known to the Ada runtime */
> > static const int MAX_NUMBER_OF_KNOWN_TASKS = 1000;
>
> What is the expected/correct format of comment here? Isn't ended with
> period and two spaces? If we still follow the "period and two spaces"
> schema here, I'll update this wikipage and source code to reflect this.
(blush) Worst example I could have chosen... This is bad.
Yes, you are correct, a period and 2 spaces would be required.
It's not entirely obvious, since you can argue that the comment
is not a sentence. However, for something that long, either we
make it a real sentence, or we think of it as a sentence. Only
in the case of very short comment can we get away with no period
at the end of comment...
Thanks for catching this. I will fix the code...
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-06 14:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-06 8:32 FYI: My Coding Style cheat-sheet on the Wiki Joel Brobecker
2011-01-06 12:38 ` Hui Zhu
2011-01-06 13:58 ` Yao Qi
2011-01-06 14:17 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox