From e46641d24d74fbe7921039834fdf5b01c4715009 Mon Sep 17 00:00:00 2001 From: Vaibhav Date: Thu, 13 Feb 2020 06:30:35 +0530 Subject: [PATCH] docs(userspace): Add banned functions to coding guidelines for c++. This updates the `CONTRIBUTING.md` in order to include `"banned.h"` in every cpp file which invalidates certain functions, hence, banned. Fixes #1035 Signed-off-by: Vaibhav --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fb5bfd35..263fa4a9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,6 +9,8 @@ - [Pull Requests](#pull-requests) - [Commit convention](#commit-convention) - [Rule type](#rule-type) + - [Coding Guidelines](#coding-guidelines) + - [C++](#c) - [Developer Certificate Of Origin](#developer-certificate-of-origin) ## Code of Conduct @@ -120,6 +122,13 @@ If you are changing only a macro, the commit will look like this: rule(macro user_known_write_monitored_dir_conditions): make sure conditions are great ``` +## Coding Guidelines + +### C++ + +* File `userspace/engine/banned.h` defines some functions as invalid tokens. These functions are not allowed to be used in the codebase. Whenever creating a new cpp file, include the `"banned.h"` headers. This ensures that the banned functions are not compiled. + + A complete list of banned functions can be found [here](./userspace/engine/banned.h). ## Developer Certificate Of Origin