AStyle built from git 2025-03-14 code produces: (full repro when inside .cpp file)
namespace testing
{
class AssertHelper
{
struct X
{
};
};
void RegisterTest()
{
class FactoryTest : public internal::TestFactoryBase
{
public:
FactoryImpl(int f) {}
Test* CreateTest() override { return nullptr; }
};
}
}
The expected "class" indentation should be:
namespace testing
{
class AssertHelper
{
struct X
{
};
};
void RegisterTest()
{
class FactoryTest : public internal::TestFactoryBase
{
public:
FactoryImpl(int f) {}
Test* CreateTest() override { return nullptr; }
};
}
}
using
--style=allman
--suffix=none
--keep-one-line-blocks
--align-pointer=type
--min-conditional-indent=0
--max-continuation-indent=80
--indent-switches
--indent-col1-comments
--indent-preproc-block
--indent-preproc-define
--pad-header
--pad-comma
--formatted
--lineend=linux
--indent-preproc-block
--convert-tabs
--preserve-ws
Last edit: Zenju 2025-03-17
The ticked can be closed! Apparently the latest changes to
https://sourceforge.net/p/astyle/bugs/585/
fixed this one as well! Thanks!