Skip to content

Coding Standards

FausticSun edited this page Mar 21, 2019 · 2 revisions

Coding Standards

Our coding standards are adapted from the C++ Best practices. The following are the specific implementations of the coding standards.

Type Requirements Enforced By
Naming Style CamelCase ReSharper++
Code Style LLVM (except naming) Clang Format
Static Analysis C++ Core Guidelines and a few others Clang Tidy

API Standards

The naming of Abstract APIs follows the naming convention of the coding standards with parameters using UPPERCASE to denote that they are symbolic. Concrete APIs are directly implemented into C++ header files and thus follow the coding conventions as described above.

Using abstract PKB API in implementation

The abstract PKB API is to a concrete API in PKB.h. UPPERCASE symbolic names are replaced with concrete names that are either part of the standard library (e.g. std::string) or that we have create ourselves. For example the STATEMENT_TYPE symbolic name is replaced with an enum type StmtType, and the TABLE symbolic name is replaced with the Table class, both following the naming conventions as set out above.

Clone this wiki locally