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ç <aomerya...@gmail.com> --- .clang-format | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000000..8ac10c0c09 --- /dev/null +++ b/.clang-format @@ -0,0 +1,30 @@ +--- +# 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 +EndOfLine: lf + +# Specify style options for the entire file +File: + # Insert a final newline character at the end of the file + EndOfFile: true + +IndentWidth: 8 + +# Set tab width to 8 spaces +TabWidth: 8 + +# Use tabs for indentation +UseTab: Always + +# Specify whitespace-related style options +Whitespace: + # Trim trailing whitespace at the end of each line + TrimTrailingWhitespace: true -- 2.34.1