Uncrustify: newline before opening a bracket to define functions

Using uncrustify 0.60

I set nl_fcall_brace = force, expecting the following result: a new line between the function arguments and the opening bracket of the function body

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

--- Instead of code remains ---

 string toNsdName(const string& sid) { if (sid.empty()) { return ""; } string temp(sid); replace_all(temp, PERIOD_MARK, DASH_MARK); return temp; } 
+4
source share
1 answer

Obviously, you needed "nl_fdef_brace = add"

+8
source

Source: https://habr.com/ru/post/1487575/


All Articles