Skip to content

Commit

Permalink
style(clang-format): enable trailing comment aligments
Browse files Browse the repository at this point in the history
Enabled alignment of trailing comments in the `.clang-format`
configuration to improve code readability and maintain consistency
across all code comments. This ensures that comments at the end of
lines align neatly, making the code easier to read and understand
at a glance.
  • Loading branch information
mdsanima committed Apr 26, 2024
1 parent c9c60ca commit 9d10bf0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ AlignConsecutiveDeclarations: false
# Align escaped newlines for the left.
AlignEscapedNewlinesLeft: true

# Align trailing comments.
# const int foo; // Comment foo
# const int bar = 2; // Comment bar
AlignTrailingComments: true

# Don't allow this rule.
AllowShortFunctionsOnASingleLine: false

Expand Down

0 comments on commit 9d10bf0

Please sign in to comment.