Uncrustify:
Where do the options work?
New lines
█
█
void bar_0(); // function definition
██
void bar_0() // function declaration
██
void A::bar_1(int a);
█ █ █
void bar_2(int a) █
█ █ █
█ █
{█
}
█
void bar_3(int x,
int y)
█ █
{
int a = 5; █
int b = 7;
█
a = 135;
list_for_each(item, list) {
█
}
█
/* c1
* c2
*/
█
int x2;
█
/* single comment */
█
// cpp comment
std::for_each(a, b, [] (int& b) -> foo {
█
b+=3; return(b);
}
█
class foo : public my_Class █
█
{
void bar_c(int t, int u) █
█ █
: t(222)
, u(88)
█
{
█
typedef char CHAR;
█ █
CHAR c;
int a;
int b;
█
c = 'a';
█
switch (a) {
█
case 0:
b = 1;
break;
█
case 1: b = 5; break;
█
case 13: {
█
b = 15;
break;
}
}
█ █
do { █
do_something();
} while (!d.isEmpty());
██ █
if (a) { █
b = 1;
} else if (c) {
█ █ █
b ;
} else {
█
b = 3;
}
█ █
for (a = 1; a < 5; a++) {
█
b = b + a;
}
█
for (int a = 1; a < 5;
a++) {
█
b = a + 4;
}
try {
█
b = 1;
if (err) {
█
throw std::runtime_error(std::string("nextKey: ") + err.asString());
}
} catch (const std::exception &exc) {
█ █
b = 3;
}
█
while (c) {
█
b ;
}
█
}
enum CaseOfOne {
█
a1,
b1,
█
// comment
c1,
█
};
struct indent_ptr_t █
{
chunk_t *ref;
█
// comment
int delta;
█
} ipt;
█
█
union UnionOfOne {
█
a1,
b1,
█
// comment
c1,
█
};
█ █
private: // same for protected:, signal: or slots: label
█
int ap;
};
█
namespace foo {
█
int foo()
{
if (foo) a++; return;
█ █
if (a)
return;
█
l123: █
int a = 5;
█
if (a > b) {
c = 7;
█
return a + b;
}
std::for_each(a, b, [] (int& b)->foo{ b+=3; return(b); });
█
QUrl dxOffEagle("http://something/newpage.html?[{\"foo: bar\"}]", QUrl::TolerantMode);
█
█
return 0;
█
/* c1
*
*/
█
void b();
█
void d();
#define LOG_CONTTEXT() \
█
LOG_FMT(LCONTTEXT \
,"%s:%d set cont_text to '%s'\n" \
,__func__, __LINE__, cmt.cont_text.c_str())
template <class T>
█
ItemJob::ItemJob(PlatformDependent *internals, const QNetworkRequest &request)
: GetJob(internals, request)
typedef int ia;
typedef int ib;
█
typedef int ic;
typedef int id;
Register
only for Java
nl_after_annotation
nl_between_annotation
nl_paren_dbrace_open
only for D
nl_after_square_assign
nl_assign_square
nl_scope_brace
nl_unittest_brace
nl_version_brace
only for oc
nl_oc_msg_args
nl_oc_msg_leave_one_liner
only for C#
nl_around_cs_property
nl_between_get_set
nl_after_try_catch_finally
nl_brace_finally
nl_finally_brace
nl_getset_brace
nl_property_brace
not yet shown
nl_after_brace_close
nl_after_brace_open
template class X { /* a */ };
template class Y { /* ... */ };
nl_after_brace_open_cmt
nl_after_func_body_one_liner
nl_after_func_proto_group
nl_after_multiline_comment
nl_after_vbrace_open_empty
nl_brace_brace
nl_class_init_args
nl_class_leave_one_liners
nl_cpp_lambda_leave_one_liners
nl_create_for_one_liner
nl_create_if_one_liner
nl_create_while_one_liner
nl_define_macro
nl_enum_leave_one_liners
nl_func_leave_one_liners
nl_getset_leave_one_liners
nl_if_leave_one_liners
nl_squeeze_ifdef
nl_using_brace