Don't right-align escaped newlines (e.g. for #define)#112381
Merged
Conversation
Member
Since it's space aligned and the rest of code use tab indentation, it's already a mess unless you are using the same tab size. So it's actually might improve readability in some cases. |
Member
|
If it were possible to force it to add a few more spaces after each line I think that would help any readability concerns from this but I don't think clang supports that |
Repiteo
approved these changes
Feb 4, 2026
Repiteo
left a comment
Contributor
There was a problem hiding this comment.
Approved in buildsystem meeting! Will be good to merge after a rebase
…usly led to long diffs in the commit history.
c3e7b68 to
3afbb04
Compare
Contributor
|
Thanks! |
rivie13
pushed a commit
to rivie13/Phoenix-Agentic-Engine
that referenced
this pull request
Feb 16, 2026
Don't right-align escaped newlines (e.g. for `#define`)
This was referenced Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes whitespace indentation for escaped newlines.
Motivation
This decouples the lines from one another for git diff purposes: When the backslashes are right-aligned, a change to the max size of the block changes all lines in it.
This leads to unnecessarily long change lists, increasing the chance and difficulty of merge conflicts, and makes it harder to view changes to these blocks in GitHub (e.g. https://github.com/godotengine/godot/pull/78971/files, though notably, the "hide whitespace" option helps, if you know it exists). In addition, the
git blameis unnecessarily modified, and line history browsers are harder to use.It also makes it hard to hand-align these blocks, which means you need to run
pre-commitwhile working on the code, or riskpre-commitchanging it later. For me, this has led to unnecessary local recompilations.Downsides
The main downside to this is that the code is arguably harder to read.
Given that C macros lead to difficult to read and error-prone code (for example, they are not hygienic), we should be limiting their use anyway (and we do, for the most part). So I think this is an acceptable caveat.