summaryrefslogtreecommitdiffstats
path: root/kernel/.clang-format
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 12:02:40 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 12:02:40 -0400
commitc2b8703d69b4d2ec40cf02cfd1709eb0ff731fda (patch)
treedecb6a5f765029ac6621bb4d499b2f9066f19f0b /kernel/.clang-format
parent4cc250f6290fe5f0fdfe5e40c933fa0530dfcc92 (diff)
parent6b7575cf909d2218b469d5119e6a2991a133401a (diff)
downloadopen-iov-c2b8703d69b4d2ec40cf02cfd1709eb0ff731fda.tar.gz
open-iov-c2b8703d69b4d2ec40cf02cfd1709eb0ff731fda.zip
merge ws/code-standards: editorconfig/clang-format, userspace style doc, SPDX sweep, conventions (handoff-code-standards.txt)
Diffstat (limited to 'kernel/.clang-format')
-rw-r--r--kernel/.clang-format51
1 files changed, 51 insertions, 0 deletions
diff --git a/kernel/.clang-format b/kernel/.clang-format
new file mode 100644
index 0000000..a3c3acb
--- /dev/null
+++ b/kernel/.clang-format
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Linux kernel style for kernel/**: tabs, tab width 8, ~80 columns
+# (see docs/07-developers/onboarding-and-standards.md 3.1).
+# Existing files are NOT to be mass-reformatted; this config governs new
+# code and hunks that are already being edited.
+---
+Language: Cpp
+BasedOnStyle: LLVM
+AccessModifierOffset: -4
+AlignAfterOpenBracket: Align
+AlignConsecutiveMacros: false
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignEscapedNewlines: Left
+AlignOperands: true
+AlignTrailingComments: false
+AllowAllArgumentsOnNextLine: false
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: Never
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: None
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: false
+BinPackArguments: true
+BinPackParameters: true
+BreakBeforeBinaryOperators: None
+BreakBeforeBraces: Linux
+BreakBeforeTernaryOperators: false
+BreakStringLiterals: false
+ColumnLimit: 80
+ContinuationIndentWidth: 8
+DerivePointerAlignment: false
+IndentCaseBlocks: false
+IndentCaseLabels: false
+IndentGotoLabels: false
+IndentPPDirectives: None
+IndentWidth: 8
+IndentWrappedFunctionNames: false
+KeepEmptyLinesAtTheStartOfBlocks: false
+MaxEmptyLinesToKeep: 1
+PointerAlignment: Right
+ReflowComments: false
+SortIncludes: Never
+SpaceAfterCStyleCast: false
+SpaceBeforeParens: ControlStatements
+SpacesBeforeTrailingComments: 1
+TabWidth: 8
+UseTab: Always