From 4028fc6de595e9a0ac1abcfc1913b9e75e95fc71 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 28 Jan 2026 20:09:17 +0000 Subject: [PATCH] CODING-STYLE.md: mention clang-format Copy/paste the section from CONTRIBUTING.md, completing the circle. Signed-off-by: Emil Velikov Reviewed-by: Lucas De Marchi Link: https://github.com/kmod-project/kmod/pull/pull/417 Signed-off-by: Lucas De Marchi --- CODING-STYLE.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CODING-STYLE.md b/CODING-STYLE.md index ec861bc5..da91c4ed 100644 --- a/CODING-STYLE.md +++ b/CODING-STYLE.md @@ -12,6 +12,7 @@ ASAP. + [Try to return/exit early](#try-to-return-exit-early) + [Avoid unnecessary initialization](#avoid-unnecessary-initialization) + [Sort the includes](#sort-the-includes) + * [Tooling - clang-format](#tooling-clang-format) # Inspiration @@ -74,6 +75,8 @@ Example: ## Sort the includes +> TODO: update our .clang-format to honour this rule + Let the includes in the following order, separated by a new line: < system headers > @@ -82,4 +85,11 @@ Let the includes in the following order, separated by a new line: < tool > "local headers" +# Tooling - clang-format + +To ease and enforce the style a [.clang-format file](.clang-format) file is +provided and ran in CI against all submissions. + +Make sure to run `git-clang-format` before submitting PRs/patches. + [Linux Kernel]: https://www.kernel.org/doc/html/v6.9/process/coding-style.html -- 2.47.3