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
Read the mailing list of the GNU project right here! The information here is regarding the GNU radio project for USRP radios.
Monday, May 11, 2020
Re: Coding standard: AllowShortFunctionsOnASingleLine?
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 <w6rz@comcast.net> wrote:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment