Skip to content

Commit

Permalink
fix: adjust sorting of include directives
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Nov 27, 2024
1 parent d108364 commit 92b2038
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ TabWidth: 4
IndentWidth: 4

#/
# Always use tab characters to fill whitespace.
# Always use tab characters for indentation.
#/
UseTab: Always
UseTab: ForIndentation

#/
# Always use `\n` for line endings.
Expand Down Expand Up @@ -254,21 +254,20 @@ AlignEscapedNewlines: DontAlign # NOTE: disabled due to very large column limit
AlignOperands: DontAlign

#/
# Align trailing comments on consecutive lines.
# Leave trailing comments as they are.
#
# @example
# // Good...
# // Okay...
# int a; // Comment
# int ab; // Comment
#
# @example
# // Bad...
# // Okay...
# int a; // Comment
# int ab; // Comment
#/
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
Kind: Leave

#/
# Disallow putting arguments onto the next line.
Expand Down Expand Up @@ -819,22 +818,25 @@ EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: true

#/
# Always merge multiple `#include` blocks together and sort as one.
# Always preserve `#include` blocks and sort separately.
#
# @example
# // Good...
# #include "a.h"
# #include "b.h"
#
# #include "a.h"
# #include "c.h"
# #include "<stdint.h>"
#
# @example
# // Bad...
# #include "b.h"
#
# #include "<stdint.h>"
# #include "c.h"
# #include "a.h"
#/
IncludeBlocks: Merge
IncludeBlocks: Preserve

#/
# Define `#include` categories and assign ordering priorities.
Expand Down

0 comments on commit 92b2038

Please sign in to comment.