Skip to content

Nested class access specifier indentation #554

@fbe555

Description

@fbe555

Problem:
When declaring nested classes in C++, the uncrustify linter indents their access specifiers incorrectly.

Current behaviour:
The following example shows the current result of running uncrustify:

class SomeClass{
public:
  class SomeNestedClass{
public:
    SomeNestedClass();

private:
    int some_private_member_;
  };
};

Desired behaviour:
The desired behaviour would be to indent access specifiers on the level of the class they belong to as shown below:

class SomeClass{
public:
  class SomeNestedClass{
  public:
    SomeNestedClass();

  private:
    int some_private_member_;
  };
};

Proposed Solution:
The desired behaviour can be obtained if the indent_access_spec property is set to -indent_columns.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions