summaryrefslogtreecommitdiffstats
path: root/.clang-format
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:53:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:53:30 +0000
commit2c7cac91ed6e7db0f6937923d2b57f97dbdbc337 (patch)
treec05dc0f8e6aa3accc84e3e5cffc933ed94941383 /.clang-format
parentInitial commit. (diff)
downloadfrr-upstream.tar.xz
frr-upstream.zip
Adding upstream version 8.4.4.upstream/8.4.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format78
1 files changed, 78 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..b01157b
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,78 @@
+---
+BasedOnStyle: LLVM
+Language: Cpp
+IndentWidth: 8
+UseTab: Always
+BreakBeforeBraces: Linux
+AlwaysBreakBeforeMultilineStrings: true
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: false
+IndentCaseLabels: false
+AlignEscapedNewlinesLeft: false
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: false
+AlignAfterOpenBracket: true
+SpaceAfterCStyleCast: false
+MaxEmptyLinesToKeep: 2
+BreakBeforeBinaryOperators: None
+BreakStringLiterals: false
+SortIncludes: false
+IncludeCategories:
+ - Regex: '^(<|lib)'
+ Priority: 0
+CommentPragmas: '\$(FRR|clippy)'
+ContinuationIndentWidth: 8
+ForEachMacros:
+ # lib
+ - frr_each
+ - frr_each_safe
+ - frr_each_from
+ - frr_rev_each
+ - frr_rev_each_safe
+ - frr_rev_each_from
+ - frr_with_mutex
+ - frr_with_privs
+ - LIST_FOREACH
+ - LIST_FOREACH_SAFE
+ - SLIST_FOREACH
+ - SLIST_FOREACH_SAFE
+ - SLIST_FOREACH_PREVPTR
+ - STAILQ_FOREACH
+ - STAILQ_FOREACH_SAFE
+ - TAILQ_FOREACH
+ - TAILQ_FOREACH_SAFE
+ - TAILQ_FOREACH_REVERSE
+ - TAILQ_FOREACH_REVERSE_SAFE
+ - RB_FOREACH
+ - RB_FOREACH_SAFE
+ - RB_FOREACH_REVERSE
+ - RB_FOREACH_REVERSE_SAFE
+ - SPLAY_FOREACH
+ - FOR_ALL_INTERFACES
+ - FOR_ALL_INTERFACES_ADDRESSES
+ - JSON_FOREACH
+ # libyang
+ - LY_FOR_KEYS
+ - LY_LIST_FOR
+ - LY_TREE_FOR
+ - LY_TREE_DFS_BEGIN
+ - LYD_TREE_DFS_BEGIN
+ # zebra
+ - RE_DEST_FOREACH_ROUTE
+ - RE_DEST_FOREACH_ROUTE_SAFE
+ - RNODE_FOREACH_RE
+ - RNODE_FOREACH_RE_SAFE
+ # bgpd
+ - UPDGRP_FOREACH_SUBGRP
+ - UPDGRP_FOREACH_SUBGRP_SAFE
+ - SUBGRP_FOREACH_PEER
+ - SUBGRP_FOREACH_PEER_SAFE
+ - SUBGRP_FOREACH_ADJ
+ - SUBGRP_FOREACH_ADJ_SAFE
+ - AF_FOREACH
+ - FOREACH_AFI_SAFI
+ - FOREACH_AFI_SAFI_NSF
+ - FOREACH_SAFI
+ # ospfd
+ - LSDB_LOOP