From c647cb48dddf04031c23062e084e72b058d7591e Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 18 Apr 2018 22:43:36 +0200 Subject: [PATCH] proposal of coding standard. Please comment [no ci] --- README.coding | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.coding b/README.coding index c0325a7f47..1154448c53 100644 --- a/README.coding +++ b/README.coding @@ -24,8 +24,15 @@ SimGrid4 will follow the these rules: (because of a bug in Sonar coverage computation) C++ - fields, methods and variables are in snake_case() - - Classes and Enum are in CamelCase - - filenames: Class.cpp and Class.hpp + - Classes and Enum are in UpperCamelCase + - public filenames: api_Class.cpp and api/Class.hpp. + - Example: src/s4u/s4u_ConditionVariable.cpp and + include/simgrid/s4u/ConditionVariable.hpp + - If you prefer api_class.cpp, that's OK, too. Breath and relax. + Example: src/s4u/s4u_actor.cpp and include/simgrid/s4u/Actor.hpp + - internal/kernel filenames: Class.cpp and Class.hpp + - Example: src/kernel/activity/Activity.cpp + include/simgrid/activity/Activity.hpp C - variables and functions are in snake_case() - typedefs do not hide the pointers, ie * must be explicit -- 2.20.1