summaryrefslogtreecommitdiffstats
path: root/.editorconfig
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
commit9441cf5f52120256aff6c41c8e6c594906ad6ae0 (patch)
treed6ebf4af72a0b0cc4ad86f86ceda65517e9ab397 /.editorconfig
parent1b1af67e9a3321619878a4e353f5250ac0c6ae63 (diff)
downloadopen-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 '.editorconfig')
-rw-r--r--.editorconfig38
1 files changed, 38 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..fd0ee61
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,38 @@
+# Open-IOV editor defaults. Per-area .clang-format files govern C layout;
+# tools must not mass-reformat existing files (see
+# docs/07-developers/onboarding-and-standards.md section 3).
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+indent_style = space
+indent_size = 4
+
+[*.md]
+trim_trailing_whitespace = false
+
+[Makefile]
+indent_style = tab
+indent_size = 8
+
+# Host kernel module: Linux kernel C style (tabs, tab width 8, ~80 columns).
+[kernel/**.{c,h}]
+indent_style = tab
+indent_size = 8
+tab_width = 8
+
+# Userspace library: LLVM base, 4 spaces, ~100 columns.
+[userspace/**.{c,h}]
+indent_style = space
+indent_size = 4
+tab_width = 4
+
+# Tools: LLVM base, 4 spaces, ~100 columns.
+[tools/**.{c,h}]
+indent_style = space
+indent_size = 4
+tab_width = 4