I have been trying to get an indentation for the constructor which looks like this:
ClassName::ClassName(const std::string &id,
std::shared_ptr<AbstractInterface> object,
bool isDynamic) :
m_id(id),
m_object(object),
m_isDynamic(isDynamic),
m_state(ClassState::CREATED)
{
}
I want the arguments to be indented so they are aligned with the first parenthesis for the argument list, but the initializer list should be indented by 4 spaces (which is my regular indent size).
I have generated my uncrustify config from a code sample file which includes this code example. I have seen that I can use indent_ctor_init, but this is set to 0 in the generated config.
Is this the config option I should be using for the initializer list?
I also have not been able to find where to set the indentation for the arguments so I don't get a newline before the first argument.
This is what I am getting now:
ClassName::ClassName(
const std::string &id,
std::shared_ptr<AbstractInterface> object,
bool isDynamic) :
m_id(id),
m_object(object),
m_isDynamic(isDynamic),
m_state(ClassState::CREATED)
{
}