Format consecutive macros not working

Hey I am using Rider now for Unreal and I decided to clean up my code by using a clang-format file. I have set 'AlignConsecutiveMacros' to true, but when running the format command over my code it does not format the code correctly:

wrong:
#define SPAWN_PLAYER_NO_PLAYER_ASSET -3
#define SPAWN_PLAYER_NO_SPAWNS -2
#define SPAWN_PLAYER_FAILURE -1
#define SPAWN_PLAYER_SUCCESS 0

expected:
#define SPAWN_PLAYER_NO_PLAYER_ASSET -3
#define SPAWN_PLAYER_NO_SPAWNS -2
#define SPAWN_PLAYER_FAILURE -1
#define SPAWN_PLAYER_SUCCESS 0

I have been reading around a bit and noticed that rider does not support clang-format, but instead converts the format settings to settings for its internal formatter. After checking the settings of the internal formatter there is indeed no option for this. Could this be added to Rider in a future release? Thanks in advance!

1 comment
Comment actions Permalink

Hello S N Riemersma,

 

Thank you for the report. Currently, Rider's internal formatter does not support this property, but I've filed a corresponding issue on the tracker. Please, feel free to vote for and follow this issue to monitor progress.

 

We also have plans to support external clang-format, but I cannot give you an exact ETA at this time.

1

Please sign in to leave a comment.