From 5e67cfbb7dec5ab6497220c0e882d4c809f5451d Mon Sep 17 00:00:00 2001
From: Felix Weiglhofer <weiglhofer@fias.uni-frankfurt.de>
Date: Mon, 13 Nov 2023 15:06:25 +0100
Subject: [PATCH] docs: Add styleguide.

---
 docs/Styleguide.md | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 docs/Styleguide.md

diff --git a/docs/Styleguide.md b/docs/Styleguide.md
new file mode 100644
index 0000000000..1c881464fe
--- /dev/null
+++ b/docs/Styleguide.md
@@ -0,0 +1,37 @@
+# Styleguide
+
+## Guidelines
+
+In general CBM follows the ALICE styleguide. It can be found here:
+
+- [Coding guidelines](https://rawgit.com/AliceO2Group/CodingGuidelines/master/coding_guidelines.html)
+- [Naming and formatting conventions](https://rawgit.com/AliceO2Group/CodingGuidelines/master/naming_formatting.html)
+- [Comments guidelines](https://rawgit.com/AliceO2Group/CodingGuidelines/master/comments_guidelines.html)
+
+## Exceptions
+
+Note that we've adopted some exceptions to these rules:
+
+### Header files
+
+Use `#pragma once` for header files instead of `#define` guards.
+
+_Reason_: Less error prone and doesn't have to be altered when the file path changes. Potential drawbacks (issues with symlinks, compiler support) don't seem relevant for CbmRoot.
+
+### Naming
+
+#### Function names
+
+Function names should start with a capital letter. (Instead of lower case in ALICE)
+
+_Reason_: Compatibility with old code.
+
+#### Class members
+
+Class members should be prefixed with f (instead of m in ALICE). (Struct members are never prefixed!)
+
+_Reason_: No advantage in changing prefix. Stay compatible with existing code.
+
+### Formatting
+
+Formatting differs in details from ALICE. Differences are caught with clang-format.
-- 
GitLab