-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
[clang-format] Add qualifiers (actual) alignments #90746
Comments
@llvm/issue-subscribers-clang-format Author: None (KBoumghar)
There's currently a `QualifierAlignment` option in ClangFormat, although I'd argue it is misnamed ; it doesn't align anything, it simply order qualifiers.
Currently, I believe that if you write : int a = 0;
const int b = 0; there is no way to obtain : int a = 0;
const int b = 0; This could be added to the options of void foo(const type1 looooooooooooooooooooongarg1,
type2 arg2){} becomes : void foo(const type1 looooooooooooooooooooongarg1,
type2 arg2){} |
You QualifierAlignment Left/Right/Custom, the QualifierOrder lets you control the order... "naming is hard" but its only confusing for 5 minutes. |
I agree this is an addition to |
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below. |
@llvm/issue-subscribers-good-first-issue Author: None (KBoumghar)
There's currently a `QualifierAlignment` option in ClangFormat, although I'd argue it is misnamed ; it doesn't align anything, it simply order qualifiers.
Currently, I believe that if you write : int a = 0;
const int b = 0; there is no way to obtain : int a = 0;
const int b = 0; This could be added to the options of void foo(const type1 looooooooooooooooooooongarg1,
type2 arg2){} becomes : void foo(const type1 looooooooooooooooooooongarg1,
type2 arg2){} |
@mydeveloperday I was thinking of maybe adding a Any opinion on the parameter part (or does this work with declaration? I'm not sure...), this is the one my team is bugging me the most about. |
This has been stale for a while , if it's a good first issue i can take a look at it. @mydeveloperday . Please assign it to me. |
It doesn't look like a "good first issue" to me. |
I'm still interested to take a look as I would like to actually use this type of formatting. |
Just posting my findings here before unassigning this as it's a bit complicated to tackle from someone who's new to this Repo. In The suggested change would be to either call Other areas that require change would be |
There's currently a
QualifierAlignment
option in ClangFormat, although I'd argue it is misnamed ; it doesn't align anything, it simply order qualifiers.Currently, I believe that if you write :
there is no way to obtain :
This could be added to the options of
AlignConsecutiveAssignements
andAlignConsecutiveDeclarations
, although it'd also be useful for parameters as well, i.e. :becomes :
The text was updated successfully, but these errors were encountered: