aboutsummaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-09-27 13:06:13 -0400
committerDavid Robillard <d@drobilla.net>2024-09-27 18:15:35 -0400
commit771215229522e203eba802bc041a1d8105de9283 (patch)
tree57e45558c47792b610649bb734dfd3f545e09688 /.clang-format
parenta4acf0c7414451d22b6264f2fabfa5eb348fbb62 (diff)
downloadserd-771215229522e203eba802bc041a1d8105de9283.tar.gz
serd-771215229522e203eba802bc041a1d8105de9283.tar.bz2
serd-771215229522e203eba802bc041a1d8105de9283.zip
Clean up and update clang-format configuration
Fix "SERD_CONST_FINC" typo, add the other function attributes, and sort all fields.
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format30
1 files changed, 16 insertions, 14 deletions
diff --git a/.clang-format b/.clang-format
index 26b10123..1ec52448 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,17 +1,29 @@
-# Copyright 2020-2023 David Robillard <d@drobilla.net>
+# Copyright 2020-2024 David Robillard <d@drobilla.net>
# SPDX-License-Identifier: 0BSD OR ISC
---
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
-AlignEscapedNewlinesLeft: true
+AlignEscapedNewlines: Left
+AttributeMacros:
+ - SERD_ALLOCATED
+ - SERD_API
+ - SERD_CONST_API
+ - SERD_CONST_FUNC
+ - SERD_FALLTHROUGH
+ - SERD_MALLOC_FUNC
+ - SERD_NODISCARD
+ - SERD_NONNULL
+ - SERD_NULLABLE
+ - SERD_PURE_API
+ - SERD_PURE_FUNC
BasedOnStyle: Mozilla
BraceWrapping:
- AfterNamespace: false
AfterClass: true
AfterEnum: false
AfterExternBlock: false
AfterFunction: true
+ AfterNamespace: false
AfterStruct: false
SplitEmptyFunction: false
SplitEmptyRecord: false
@@ -21,20 +33,10 @@ IndentCaseLabels: false
IndentPPDirectives: AfterHash
KeepEmptyLinesAtTheStartOfBlocks: false
SpacesInContainerLiterals: false
-AttributeMacros:
- - SERD_ALLOCATED
- - SERD_API
- - SERD_CONST_FINC
- - SERD_FALLTHROUGH
- - SERD_MALLOC_FUNC
- - SERD_NODISCARD
- - SERD_NONNULL
- - SERD_NULLABLE
- - SERD_PURE_FUNC
StatementMacros:
- SERD_DEPRECATED_BY
- - SERD_LOG_FUNC
- SERD_DISABLE_NULL_WARNINGS
+ - SERD_LOG_FUNC
- SERD_RESTORE_WARNINGS
- _Pragma
...