You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by James Peach <jp...@apache.org> on 2017/06/07 04:51:26 UTC
consistent whitespace between functions
Hi all,
I’m starting to see code written like this, with no empty line between
functions:
void
foo()
{
}
void
bar()
{
}
I would like to be consistent about keeping a single empty line between
functions, even inline in class definitions. The extra whitespace makes
it easier to read and to navigate in most editors.
void
foo()
{
}
void
bar()
{
}
There’s no clang-format option for this, so assuming we agree,
committers and reviewers would have to pay attention and do it by hand.
thanks,
James
Re: consistent whitespace between functions
Posted by Leif Hedstrom <zw...@apache.org>.
> On Jun 6, 2017, at 10:51 PM, James Peach <jp...@apache.org> wrote:
>
> Hi all,
>
> I’m starting to see code written like this, with no empty line between functions:
>
> void
> foo()
> {
> }
> void
> bar()
> {
> }
>
This is likely a misbehavior of clang-format. I’ve had it do this on my code. You can force it by putting in whitespaces again, and hope that it doesn’t mess with you again.
The intent for sure has always been to have whitespaces between these, and I know we had this discussion before when we noticed clang-format messing shit up.
Cheers,
— Leif
> I would like to be consistent about keeping a single empty line between functions, even inline in class definitions. The extra whitespace makes it easier to read and to navigate in most editors.
>
> void
> foo()
> {
> }
>
> void
> bar()
> {
> }
>
> There’s no clang-format option for this, so assuming we agree, committers and reviewers would have to pay attention and do it by hand.
>
> thanks,
> James
Re: consistent whitespace between functions
Posted by John Rushford <jj...@gmail.com>.
+1
> On Jun 7, 2017, at 6:11 AM, Alan Carroll <so...@yahoo-inc.com.INVALID> wrote:
>
> Seems reasonable to me.
>
>
>
> On Tuesday, June 6, 2017, 11:51:29 PM CDT, James Peach <jp...@apache.org> wrote:
>
> Hi all,
>
> I’m starting to see code written like this, with no empty line between
> functions:
>
> void
> foo()
> {
> }
> void
> bar()
> {
> }
>
> I would like to be consistent about keeping a single empty line between
> functions, even inline in class definitions. The extra whitespace makes
> it easier to read and to navigate in most editors.
>
> void
> foo()
> {
> }
>
> void
> bar()
> {
> }
>
> There’s no clang-format option for this, so assuming we agree,
> committers and reviewers would have to pay attention and do it by hand.
>
> thanks,
> James
Re: consistent whitespace between functions
Posted by Alan Carroll <so...@yahoo-inc.com.INVALID>.
Seems reasonable to me.
On Tuesday, June 6, 2017, 11:51:29 PM CDT, James Peach <jp...@apache.org> wrote:
Hi all,
I’m starting to see code written like this, with no empty line between
functions:
void
foo()
{
}
void
bar()
{
}
I would like to be consistent about keeping a single empty line between
functions, even inline in class definitions. The extra whitespace makes
it easier to read and to navigate in most editors.
void
foo()
{
}
void
bar()
{
}
There’s no clang-format option for this, so assuming we agree,
committers and reviewers would have to pay attention and do it by hand.
thanks,
James
Re: consistent whitespace between functions
Posted by Bryan Call <bc...@apache.org>.
+1 - That is how I like it!
-Bryan
> On Jun 6, 2017, at 9:51 PM, James Peach <jp...@apache.org> wrote:
>
> Hi all,
>
> I’m starting to see code written like this, with no empty line between functions:
>
> void
> foo()
> {
> }
> void
> bar()
> {
> }
>
> I would like to be consistent about keeping a single empty line between functions, even inline in class definitions. The extra whitespace makes it easier to read and to navigate in most editors.
>
> void
> foo()
> {
> }
>
> void
> bar()
> {
> }
>
> There’s no clang-format option for this, so assuming we agree, committers and reviewers would have to pay attention and do it by hand.
>
> thanks,
> James