From patchwork Sat May 4 13:41:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= X-Patchwork-Id: 139859 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C7E7843F86; Sat, 4 May 2024 15:41:41 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9264E402D5; Sat, 4 May 2024 15:41:41 +0200 (CEST) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by mails.dpdk.org (Postfix) with ESMTP id 3CDFD4014F for ; Sat, 4 May 2024 15:41:40 +0200 (CEST) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a59b58fe083so20075966b.0 for ; Sat, 04 May 2024 06:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714830099; x=1715434899; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zxKQ9Qw5X07gVqDQfjUXlc13/S5M2B3AAjWJFL1nAkc=; b=LKjgHgPerFUkeLY7UEGJ8IRkVF0Cx+dT2DnQGu/U9zwObRBPu1W5/G/oOR7PfkSIOd Ji/KgOIn/5BJMHAXEB3B96JZ64wd/Cwc6WBX0/2Jig1+ZYwR+kbKbgFGAcsC9nfA3f5Z Ct0FwXHOKoSbirEaleR3sCy/xSGjRKYOUh+pmef9dcOjKUKHmcdRW8zuIr9ElHDRXxqF 6/ca3wOwQ0tvTn0ZZZbzgyWgeLjh4ReJ9G1FiI3x1eqplZOQ7J8XHrUrjpbUPNB5tMjC k2dLTLBdFg12eu42xQp/l1D2nP40OqX7jXI2nTeCLOAVc2TSAb73d+esq0WjFhJ1HjTL oeiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714830099; x=1715434899; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zxKQ9Qw5X07gVqDQfjUXlc13/S5M2B3AAjWJFL1nAkc=; b=LIGJIEJrhFIoISbubtKXhlTOOMgt+P5OW0flcZQTdjcG4IJSrPoT/1H7pueJyrUC3b bQKIgibq6tWmngM8lLnTgvgsfQm1Y9aDtDeqO9O+3c6zvF8CnwshEVQTlksDo15NZ2Mj 30ci7Yw5PONKgoxm6/A+fkh4MiSoQ0hmTwIZLp0jYsC5TkZlmU2GOrFZEup/KRBFQ7NG o8rWrB4HKUG+FX8nsXEDzTW5uo77o7bBnXaF0DqZkpWWeOPuqmJNXGkVCLPUxlXwTZA/ 5kEcmRhagOXZV2V0wIq9ruwaoVp3Ed3wF7ZW1d/l/60M1LJ0FPPw5W0Zie9ZBRemZGfb Jsmw== X-Gm-Message-State: AOJu0Yw7sJCc2sqqTnlvrU6e59WIkAR4XIzZQh8yyeRAjOHgPFNHfLTM l07xcLRut3IDuOeBtG4npnGuqhsPHAdJtjUvoKIx31N73gTNt2Vi7tKn5g== X-Google-Smtp-Source: AGHT+IHZu05wkAoeV2mhpHzjxGDPJybhcmwabnD225NYpT1MdwSbY8Ios4CLjPhNRej3OziwBA0nDQ== X-Received: by 2002:a17:907:86a0:b0:a59:900f:1742 with SMTP id qa32-20020a17090786a000b00a59900f1742mr3598782ejc.38.1714830099408; Sat, 04 May 2024 06:41:39 -0700 (PDT) Received: from dcu.otaknetworks.com ([212.156.37.190]) by smtp.gmail.com with ESMTPSA id bm26-20020a170906c05a00b00a5588a9fe66sm2921827ejb.86.2024.05.04.06.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 06:41:39 -0700 (PDT) From: =?utf-8?b?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= To: dev@dpdk.org Cc: =?utf-8?b?QWJkdWxsYWggw5ZtZXIgWWFtYcOn?= Subject: [PATCH v2] devtools: add .clang-format file Date: Sat, 4 May 2024 13:41:35 +0000 Message-Id: <20240504134135.1082509-1-aomeryamac@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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ç --- .clang-format | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000000..480beaca20 --- /dev/null +++ b/.clang-format @@ -0,0 +1,42 @@ +--- +BasedOnStyle: LLVM + +# Place opening and closing parentheses on the same line for control statements +BreakBeforeBraces: Custom +BraceWrapping: + AfterFunction: false + AfterControlStatement: false + AfterEnum: 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