forked from pq-code-package/mlkem-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
25 lines (24 loc) · 1.04 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# SPDX-License-Identifier: Apache-2.0
#
# clang-format style file for mlkem-native
#
BasedOnStyle: Google
MaxEmptyLinesToKeep: 3
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
DerivePointerAlignment: false
PointerAlignment: Right
# TODO(davidben): The default for Google style is now Regroup, but the default
# IncludeCategories does not recognize <openssl/header.h>. We should
# reconfigure IncludeCategories to match. For now, keep it at Preserve.
IncludeBlocks: Preserve
# Designate CBMC contracts/macros that appear in .h files
# as "attributes" so they don't get increasingly indented line after line
BreakBeforeBraces: Allman
WhitespaceSensitiveMacros: ['__contract__', '__loop__' ]
Macros:
# Make this artifically long to avoid function bodies after short contracts
- __contract__(x)={ void a; void b; void c; void d; void e; void f; } void abcdefghijklmnopqrstuvw()
- __loop__(x)={}
# Make this artifically long to force line break
- MLKEM_NATIVE_INTERNAL_API=void abcdefghijklmnopqrstuvwabcdefghijklmnopqrstuvwabcdefg();