You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`error` for problems that lead to an unwanted behaviour of the code,
193
193
-`fatal` for critical problems that make further running of the code impossible or useless.
194
194
- Include only needed headers but do not rely on implicitly included headers. See [Include What You Use](https://github.com/AliceO2Group/O2Physics/issues/8357).
195
-
- Organise `#include`s into groups (separated by a blank line) in the following order:
196
-
- C++
197
-
- other external headers
198
-
- ROOT
199
-
- O2
200
-
- O2Physics
201
-
- PWG other than HF
202
-
- PWGHF
203
-
- Put PAG headers after the common ones.
195
+
- Sort `#include`s from most specific to least specific and organise them into groups (separated by a blank line) in the following order (can be done automatically with [clang-format](../tools/README.md#pre-commit-hooks)):
196
+
197
+
1. Main module
198
+
2. Local-like file
199
+
3. Project (O2Physics)
200
+
- PWG (You can surround the PWG block with `// clang-format off` and `// clang-format on` directives to preserve the order.)
201
+
- Same PWG, same PAG
202
+
- Same PWG, different PAG
203
+
- Same PWG, non-PAG
204
+
- Other PWG
205
+
- Other
206
+
4. Third-party
207
+
- O2
208
+
- ROOT
209
+
- Other non-system (FastJet, ONNX, KFParticle,...)
210
+
- Anything else
211
+
5. System
212
+
- C++ standard library
213
+
- C standard library
214
+
204
215
- Sort `#include`s alphabetically within a group.
205
216
- Avoid using hard-coded PDG codes. Use their `enum` names instead
206
217
(from [`PDG_t`](https://root.cern/doc/master/TPDGCode_8h.html) or
0 commit comments