discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coding standard: AllowShortFunctionsOnASingleLine?


From: Martin Braun
Subject: Re: Coding standard: AllowShortFunctionsOnASingleLine?
Date: Mon, 11 May 2020 10:53:19 -0700

In case this adds clarification: Before committing, just run clang-format -i on your code. That way, you can write code however you like, and then have a computer fix the formatting for you.
Many editors also let you clang-format inside the IDE. Personally, I reformat in vim on demand (I prefer not to have vim auto-correct while I'm typing), and I have a pre-commit hook to warn me if I'm checking in badly formatted code. If it slips through the cracks, don't worry: GitHub will tell you, and you just need to fix and force-push your branch. No harm done!

--M

On Sun, May 10, 2020 at 4:37 AM Ron Economos <address@hidden> wrote:

You're not doing anything wrong. The comments you received are incorrect. If you clang-format your files, you'll be fine.

Ron

On 5/10/20 04:08, Christophe Seguinot wrote:

Hi

I recently submitted an "add eye_sink" PR. (as I'm not familiar with PR, I made several attempts/close :  correct coding standard and new line at EOF....)

I'm sucked on a request to use the following format for short function

    function()
    {
        code;
    }

However  using   GNURadio coding standard clang-format  uses the directive:

    AllowShortFunctionsOnASingleLine: All

which format short function on a single line.

What am I doing wrong?

Please could someone guide me to the right direction so that my next PR will be the good one?

Regards


reply via email to

[Prev in Thread] Current Thread [Next in Thread]