The explanation for option "--break-blocks" in astyle -h
is
--break-blocks OR -f Insert empty lines around unrelated blocks, labels, classes, ...
But when I tried to format the following code:
class A {
int xxx;
};
class B {
int yyy;
};
int test() {
return 0;
}
int test2() {
return 1;
}
by running astyle --break-blocks < untitled1.cpp
, I got:
class A {
int xxx;
};
class B {
int yyy;
};
int test() {
return 0;
}
int test2() {
return 1;
}
No empty lines was added. It seems that the option doesn't work for class and function blocks.
And the option "--break-blocks " doesn't work, too.
Fix: the option "--break-blocks=all" doesn't work, too.
Fixed in 3.4.15