From: "Abdullah Ömer Yamaç" <aomeryamac@gmail.com>
To: dev@dpdk.org
Cc: stephen@networkplumber.org, "Abdullah Ömer Yamaç" <aomeryamac@gmail.com>
Subject: [PATCH v4] devtools: add .clang-format file
Date: Wed, 8 May 2024 21:19:34 +0000 [thread overview]
Message-ID: <20240508211934.1143124-1-aomeryamac@gmail.com> (raw)
In-Reply-To: <CA+sj1i9RvD5o7sczf_aVjjo+5P=P0UzL=8hEe9qc92VSQsqpjw@mail.gmail.com>
clang-format is a tool to format C/C++/Objective-C code. It can be used
to reformat code to match a given coding style, or to ensure that code
adheres to a specific coding style. It helps to maintain a consistent
coding style across the DPDK codebase.
.clang-format file overrides the default style options provided by
clang-format and large set of IDEs and text editors support it.
Signed-off-by: Abdullah Ömer Yamaç <aomeryamac@gmail.com>
---
.clang-format | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 141 insertions(+)
create mode 100644 .clang-format
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000000..6d270524f7
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,141 @@
+---
+BasedOnStyle: LLVM
+
+# Place opening and closing parentheses on the same line for control statements
+BreakBeforeBraces: Custom
+BraceWrapping:
+ AfterFunction: true
+ AfterControlStatement: false
+
+# Set maximum line length to 100 characters
+ColumnLimit: 100
+
+# Use LF (line feed) as the end-of-line character
+LineEnding: LF
+
+# Insert a newline at the end of the file
+InsertNewlineAtEOF: true
+
+# Set indentation width to 8 spaces
+IndentWidth: 8
+
+# Set continuation indentation width to 8 spaces
+ContinuationIndentWidth: 8
+
+# Set tab width to 8 spaces
+TabWidth: 8
+
+# Use tabs for indentation
+UseTab: Always
+
+# Preserve include blocks as they are
+IncludeBlocks: Preserve
+
+# Never sort includes
+SortIncludes: Never
+
+# Always break after return type for top-level definitions
+AlwaysBreakAfterReturnType: TopLevelDefinitions
+
+# Always break before multiline string literals
+AlignEscapedNewlines: Left
+
+# Foreach macros
+ForEachMacros:
+ [
+ "CIRBUF_FOREACH",
+ "DLB2_LIST_FOR_EACH",
+ "DLB2_LIST_FOR_EACH_SAFE",
+ "ECORE_LIST_FOR_EACH_ENTRY",
+ "ECORE_LIST_FOR_EACH_ENTRY_SAFE",
+ "FOR_EACH",
+ "FOR_EACH_BUCKET",
+ "FOR_EACH_CNIC_QUEUE",
+ "FOR_EACH_COS_IN_TX_QUEUE",
+ "FOR_EACH_ETH_QUEUE",
+ "FOR_EACH_MEMBER",
+ "FOR_EACH_NONDEFAULT_ETH_QUEUE",
+ "FOR_EACH_NONDEFAULT_QUEUE",
+ "FOR_EACH_PORT",
+ "FOR_EACH_PORT_IF",
+ "FOR_EACH_QUEUE",
+ "FOR_EACH_SUITE_TESTCASE",
+ "FOR_EACH_SUITE_TESTSUITE",
+ "FOREACH_ABS_FUNC_IN_PORT",
+ "FOREACH_DEVICE_ON_AUXILIARY_BUS",
+ "FOREACH_DEVICE_ON_CDXBUS",
+ "FOREACH_DEVICE_ON_PCIBUS",
+ "FOREACH_DEVICE_ON_PLATFORM_BUS",
+ "FOREACH_DEVICE_ON_UACCEBUS",
+ "FOREACH_DEVICE_ON_VMBUS",
+ "FOREACH_DRIVER_ON_AUXILIARY_BUS",
+ "FOREACH_DRIVER_ON_CDXBUS",
+ "FOREACH_DRIVER_ON_PCIBUS",
+ "FOREACH_DRIVER_ON_PLATFORM_BUS",
+ "FOREACH_DRIVER_ON_UACCEBUS",
+ "FOREACH_DRIVER_ON_VMBUS",
+ "FOREACH_SUBDEV",
+ "FOREACH_SUBDEV_STATE",
+ "HLIST_FOR_EACH_ENTRY",
+ "ILIST_FOREACH",
+ "LIST_FOR_EACH_ENTRY",
+ "LIST_FOR_EACH_ENTRY_SAFE",
+ "LIST_FOREACH",
+ "LIST_FOREACH_FROM",
+ "LIST_FOREACH_FROM_SAFE",
+ "LIST_FOREACH_SAFE",
+ "ML_AVG_FOREACH_QP",
+ "ML_AVG_FOREACH_QP_MVTVM",
+ "ML_AVG_RESET_FOREACH_QP",
+ "ML_MAX_FOREACH_QP",
+ "ML_MAX_FOREACH_QP_MVTVM",
+ "ML_MAX_RESET_FOREACH_QP",
+ "ML_MIN_FOREACH_QP",
+ "ML_MIN_FOREACH_QP_MVTVM",
+ "ML_MIN_RESET_FOREACH_QP",
+ "MLX5_ETH_FOREACH_DEV",
+ "MLX5_IPOOL_FOREACH",
+ "MLX5_L3T_FOREACH",
+ "OSAL_LIST_FOR_EACH_ENTRY",
+ "OSAL_LIST_FOR_EACH_ENTRY_SAFE",
+ "PLT_TAILQ_FOREACH_SAFE",
+ "RTE_BBDEV_FOREACH",
+ "RTE_DEV_FOREACH",
+ "RTE_DMA_FOREACH_DEV",
+ "RTE_EAL_DEVARGS_FOREACH",
+ "RTE_ETH_FOREACH_DEV",
+ "RTE_ETH_FOREACH_DEV_OF",
+ "RTE_ETH_FOREACH_DEV_OWNED_BY",
+ "RTE_ETH_FOREACH_DEV_SIBLING",
+ "RTE_ETH_FOREACH_MATCHING_DEV",
+ "RTE_ETH_FOREACH_VALID_DEV",
+ "RTE_GPU_FOREACH",
+ "RTE_GPU_FOREACH_CHILD",
+ "RTE_GPU_FOREACH_PARENT",
+ "RTE_LCORE_FOREACH",
+ "RTE_LCORE_FOREACH_WORKER",
+ "RTE_TAILQ_FOREACH",
+ "RTE_TAILQ_FOREACH_SAFE",
+ "SILIST_FOREACH",
+ "SLIST_FOREACH",
+ "SLIST_FOREACH_FROM",
+ "SLIST_FOREACH_FROM_SAFE",
+ "SLIST_FOREACH_PREVPTR",
+ "SLIST_FOREACH_SAFE",
+ "STAILQ_FOREACH",
+ "STAILQ_FOREACH_FROM",
+ "STAILQ_FOREACH_FROM_SAFE",
+ "STAILQ_FOREACH_SAFE",
+ "TAILQ_FOREACH",
+ "TAILQ_FOREACH_ENTRY",
+ "TAILQ_FOREACH_ENTRY_SAFE",
+ "TAILQ_FOREACH_FROM",
+ "TAILQ_FOREACH_FROM_SAFE",
+ "TAILQ_FOREACH_REVERSE",
+ "TAILQ_FOREACH_REVERSE_FROM",
+ "TAILQ_FOREACH_REVERSE_FROM_SAFE",
+ "TAILQ_FOREACH_REVERSE_SAFE",
+ "TAILQ_FOREACH_SAFE",
+ ]
+ObjCSpaceAfterProperty: true
+IndentGotoLabels: false
--
2.34.1
next prev parent reply other threads:[~2024-05-08 21:19 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 13:04 [PATCH] " Abdullah Ömer Yamaç
2024-04-29 13:32 ` Ferruh Yigit
2024-04-29 15:36 ` Stephen Hemminger
2024-04-29 15:43 ` Stephen Hemminger
2024-05-04 13:38 ` Abdullah Ömer Yamaç
2024-05-04 13:41 ` [PATCH v2] " Abdullah Ömer Yamaç
2024-05-04 16:27 ` Stephen Hemminger
2024-05-04 18:18 ` Abdullah Ömer Yamaç
2024-05-04 19:18 ` [PATCH v3] " Abdullah Ömer Yamaç
2024-05-05 16:18 ` Stephen Hemminger
2024-05-05 18:43 ` Abdullah Ömer Yamaç
2024-05-05 16:20 ` Stephen Hemminger
2024-05-05 19:42 ` Abdullah Ömer Yamaç
2024-05-05 20:38 ` Stephen Hemminger
2024-05-06 10:43 ` Abdullah Ömer Yamaç
2024-05-08 21:19 ` Abdullah Ömer Yamaç [this message]
2024-05-13 13:08 ` [PATCH v4] " Ferruh Yigit
2024-05-13 15:55 ` Stephen Hemminger
2024-05-13 19:11 ` Morten Brørup
2024-05-14 7:56 ` Bruce Richardson
2024-05-14 16:59 ` Tyler Retzlaff
2024-05-15 8:28 ` Abdullah Ömer Yamaç
2024-05-15 8:43 ` Bruce Richardson
2024-05-15 10:19 ` Abdullah Ömer Yamaç
2024-05-15 11:41 ` Bruce Richardson
2024-05-15 15:07 ` Stephen Hemminger
2024-05-15 20:32 ` Abdullah Ömer Yamaç
2024-05-16 8:20 ` [PATCH v5] " Abdullah Ömer Yamaç
2024-05-17 9:30 ` Bruce Richardson
2024-10-07 17:24 ` Stephen Hemminger
2024-10-14 22:15 ` [PATCH v6] " Abdullah Ömer Yamaç
2024-10-15 3:12 ` Stephen Hemminger
2024-10-14 22:16 ` Abdullah Ömer Yamaç
2024-04-30 21:27 ` [PATCH] " Abdullah Ömer Yamaç
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240508211934.1143124-1-aomeryamac@gmail.com \
--to=aomeryamac@gmail.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).