diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-08 11:52:43 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-08 11:52:43 -0400 |
| commit | 9441cf5f52120256aff6c41c8e6c594906ad6ae0 (patch) | |
| tree | d6ebf4af72a0b0cc4ad86f86ceda65517e9ab397 /kernel | |
| parent | 1b1af67e9a3321619878a4e353f5250ac0c6ae63 (diff) | |
| download | open-iov-9441cf5f52120256aff6c41c8e6c594906ad6ae0.tar.gz open-iov-9441cf5f52120256aff6c41c8e6c594906ad6ae0.zip | |
standards: add .editorconfig and per-area .clang-format configs
Editor defaults at the repo root; kernel/ uses Linux kernel style (tabs,
width 8, ~80 cols) and userspace//tools/ use LLVM base with 4-space indent
and ~100 cols. Configs govern new code and edited hunks only: existing
files are not to be mass-reformatted (recorded in the file headers and
docs/07-developers/onboarding-and-standards.md 3.1/3.2).
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/.clang-format | 51 |
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 |
