Skip to content

regression with nl_fdef_brace and nested namespaces #1646

@dirk-thomas

Description

@dirk-thomas

I just tried to upgrade from an older version of uncrustify but the behavior seem to have been regressed for the following input:

int
ns1::ns2::func()
{
  return 0;
}

With the setting nl_fdef_brace = force I expect the newline between the () and the { to stay and the output to be equal to the input. At least that was the behavior before. The current version changes the output to:

int
ns1::ns2::func() {
  return 0;
}

The full configuration used with the latest hash of uncrustify can be found here.

The "working" version of uncrustify is from Sep 29, 2017 using this configuration file.

It seems to be that the option nl_fdef_brace doesn't even apply in this case. The behavior stays the same independent of what value the option has. Maybe this case get misclassified due to a recent change?

Please let me know if there is any further information I can provide to resolve the regression.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions