[PATCH v3] devtools: add .clang-format file
Stephen Hemminger
stephen at networkplumber.org
Sun May 5 18:18:55 CEST 2024
On Sat, 4 May 2024 19:18:37 +0000
Abdullah Ömer Yamaç <aomeryamac at gmail.com> wrote:
> 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 at gmail.com>
> ---
> .clang-format | 138 ++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 138 insertions(+)
> create mode 100644 .clang-format
Tried this, but it needs some change to how braces at start of function
are handled. For example, this is not how DPDK should look:
static int
-rte_pmd_tap_remove(struct rte_vdev_device *dev)
-{
+rte_pmd_tap_remove(struct rte_vdev_device *dev) {
struct rte_eth_dev *eth_dev = NULL;
/* find the ethdev entry */
More information about the dev
mailing list