Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uncrustify: newline before opening brace for function definitions

Tags:

uncrustify

Using uncrustify 0.60

I set nl_fcall_brace=force expecting the following result: newline between function arguments and the opening brace of function body

string toNsdName(const string& sid) 
{
   if (sid.empty())
   {
      return "";
   }
   string temp(sid);
   replace_all(temp, PERIOD_MARK, DASH_MARK);
   return temp;
}

--- Instead code remains ---

string toNsdName(const string& sid) {
   if (sid.empty())
   {
      return "";
   }
   string temp(sid);
   replace_all(temp, PERIOD_MARK, DASH_MARK);
   return temp;
}
like image 517
VladT Avatar asked Jun 21 '13 23:06

VladT


1 Answers

Apparently what was needed is "nl_fdef_brace=add"

like image 52
VladT Avatar answered Oct 19 '22 18:10

VladT