Keep blank lines around C++ access modifiers and inner classes

Hey there,

I try to setup the coding style for my project (Unreal Engine C++) and looking for a way to have a single blank line around access modifiers (public, protected and private) and a single blank line before the closing } of a class definition.

class MyClass
{
SOME_MACRO()
// KEEP OR INSERT A BLANK LINE HERE
public:
// KEEP OR INSERT A BLANK LINE HERE
void Method();
// KEEP OR INSERT A BLANK LINE HERE
};

I don't see any possibility with the current settings of Rider. Is there a solution?

Thanks in advance.

1 comment
Comment actions Permalink

Hello Philipp8, thank you for your question. Do you have a chance to install Rider 2022.3 EAP9 build? Since these settings were implemented in EAP builds. Please try configuring the following options:

- File | Settings | Editor | Code Style | C++ | Blank Lines | Before access specifier
- File | Settings | Editor | Code Style | C++ | Blank Lines | After access specifier
- File | Settings | Editor | Code Style | C++ | Blank Lines | Remove blank lines after '{' and before '}' in declarations 

Please let me know how it works for you.

 

0

Please sign in to leave a comment.