-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controlled handling of spacing before a pointer '*'. #4199
Comments
you need to use the option |
Hi, We would prefer to not use that, and would rather more granular option(s). For example, "sp_before_ptr_star = force" causes typecasting spacing that we do not want. Note - |
CURRENT VERSION:
Uncrustify-0.78.1-52-83bfd3e0a
ISSUE:
We cannot control the spacing before ‘*’, in this case.
EXAMPLE 1:
INPUT (written in *.c files):
typedef struct EXAMPLE_MENU_OPTION* EXAMPLE_HDL;
EXPECTED OUTPUT:
typedef struct EXAMPLE_MENU_OPTION *EXAMPLE_HDL;
ACTUAL OUTPUT:
typedef struct EXAMPLE_MENU_OPTION*EXAMPLE_HDL;
Error: A space is not added before the '*'.
EXAMPLE 2:
INPUT:
typedef struct EXAMPLE_MENU_OPTION * EXAMPLE_HDL;
OUTPUT:
typedef struct EXAMPLE_MENU_OPTION *EXAMPLE_HDL;
Our current configuration ignores the space before the '', so we can achieve the format we want. However, we do not want to ignore the space before, and only have force/remove.
It is correct that the space is removed after the ''.
CONCLUSION:
I am struggling to see an option that forces a space to be put before the ‘*’ in this case, help here would be appreciated.
I can see a couple of options: a new configurable option/modifying an existing option like 'sp_before_unnamed_ptr_star' to account for this, or that I have missed an option in the configuration and this was possible all along.
Please could you advise me on options I may have missed?
Please let me know if there is any more information needed, and I will provide it if I can.
Uncrusify
uncrustify.txt
Debug .A
myExample_A.txt
Debug .p
myExample_p.txt
The text was updated successfully, but these errors were encountered: