mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
TL;DR: Improved developer productivity for many contributors Add a shared .editorconfig so contributors get lightweight, editor-native hints while writing code instead of only discovering formatting issues later in style checks. This is advisory, but useful: editors can already guide indentation, whitespace, line endings, and final newlines as you type. They can also show a visual guide at the 80-character line width, which is one of the main motivations here. Most LLM-generated code and contributions over the past year have already conventionally followed the 80-character limit, so this makes the expected style visible and consistent for everyone. .editorconfig is a decade-old standard, and virtually every editor or IDE supports it. Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
26 lines
491 B
INI
26 lines
491 B
INI
# https://editorconfig.org/
|
|
#
|
|
# Hints for editors to assist with correct formatting as you type.
|
|
root = true
|
|
|
|
# Unix-style newlines with a newline ending every file
|
|
[*]
|
|
charset = utf-8
|
|
indent_size = 4
|
|
end_of_line = lf
|
|
indent_style = space
|
|
insert_final_newline = true
|
|
trim_trailing_whitespace = true
|
|
# Recommendation, not enforced.
|
|
max_line_length = 80
|
|
|
|
[Makefile]
|
|
indent_style = tab
|
|
|
|
# Inherited as default
|
|
# [*.sh]
|
|
# indent_size = 4
|
|
|
|
[{Cargo.lock,*.md,*.toml,*.yml,*.yaml}]
|
|
indent_size = 2
|