[haiku-development] Re: Checker bot for Gerrit

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 4 Apr 2021 10:40:04 +0200

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?

-- 
Adrien.

Other related posts: