From dde725228f4fee159cca3c58e4cbc8cb2793fa2e Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sun, 12 Jul 2026 05:34:57 -0300 Subject: .editorconfig: Add EditorConfig for deterministic whitespace Add an .editorconfig at the layer root encoding the Yocto Recipe Style Guide whitespace rules (spaces, 4-wide, no tabs, trimmed trailing whitespace, final newline), mirroring meta-openembedded's config. Editors apply it automatically on save and it can be gated in CI with editorconfig-checker, giving deterministic enforcement that the oelint-adv whitespace auto-fixes cannot provide. Signed-off-by: Otavio Salvador --- .editorconfig | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..51367ad58 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,32 @@ +# EditorConfig: deterministic whitespace enforcement for a Yocto/OE layer. +# https://editorconfig.org — every modern editor applies these on save, and CI +# can gate them with `editorconfig-checker`. Mirrors meta-openembedded's config +# and the Yocto Recipe Style Guide: spaces, 4 wide, no tabs, trimmed, LF, final +# newline. This complements oelint-adv (which handles semantic rules) and removes +# the need for oelint's non-deterministic whitespace auto-fixes. +root = true + +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 +indent_style = space +indent_size = 4 + +# Makefiles require literal tabs. +[Makefile] +indent_style = tab + +# Markdown uses trailing whitespace for hard line breaks. +[*.md] +trim_trailing_whitespace = false + +# Never normalise patches — their bytes must match upstream exactly. +[*.{patch,diff}] +end_of_line = unset +insert_final_newline = unset +trim_trailing_whitespace = unset +charset = unset +indent_style = unset +indent_size = unset -- cgit v1.2.3-54-g00ecf