[haiku-development] Re: Checker bot for Gerrit

  • From: saloni goyal <salonig1212@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 4 Apr 2021 16:17:13 +0530

On Sun, Apr 4, 2021 at 2:11 PM Adrien Destugues
<pulkomandy@xxxxxxxxxxxxx> wrote:


On Sat, Apr 03, 2021 at 02:01:43AM +0530, saloni goyal wrote:
Hello,
While working on the bug. I have one doubt. Empty function in one line
should be a correct format or not? Because the inline members inside a
class are discouraged and in order to maintain the original code style
I have found a solution of setting
Style.AllowShortFunctionsOnASingleLine = FormatStyle::SFS_Empty;
which lead us to have original code as shown in commit but the empty
functions like destructors will be converted to a single line function
as shown below

InputMouse::~InputMouse() {}

What do you think about that approach, will this be acceptable?

It looks fine to me.

This style is already used in our sourcecode in some places (I did a
simple "git grep headers/ src/ {}" to see that).

Can you submit a pull request to github.com/haiku/website to update the
coding guidelines with an example of this?

I have created a pull request. Please have a look and let me know if
any changes are required.


-- 
Saloni
https://github.com/saloniig
https://hackace2.wordpress.com/

Other related posts: