summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 11:52:43 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-08 11:52:43 -0400
commitccd19e22323c29f19ec57c1995dc9d370b3e38d7 (patch)
tree0eef158498614a56b2dcc1e743528ccf9cee9e4a /tools
parent25d23d32f53a1beb8d2302d6f589cef04d105c48 (diff)
downloadopen-iov-ccd19e22323c29f19ec57c1995dc9d370b3e38d7.tar.gz
open-iov-ccd19e22323c29f19ec57c1995dc9d370b3e38d7.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 'tools')
-rw-r--r--tools/.clang-format18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/.clang-format b/tools/.clang-format
new file mode 100644
index 0000000..fa09baa
--- /dev/null
+++ b/tools/.clang-format
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Tools style: LLVM base, 4-space indent, ~100 columns
+# (see docs/07-developers/onboarding-and-standards.md 3.2).
+# Existing files are NOT to be mass-reformatted; this config governs new
+# code and hunks that are already being edited.
+---
+Language: Cpp
+BasedOnStyle: LLVM
+AllowShortFunctionsOnASingleLine: Empty
+BreakBeforeBraces: Attach
+ColumnLimit: 100
+DerivePointerAlignment: false
+IndentWidth: 4
+PointerAlignment: Right
+SortIncludes: Never
+TabWidth: 4
+UseTab: Never