Skip to content

Coding Conventions

Philipp Dominik Schubert edited this page Nov 5, 2021 · 13 revisions

Coding Guidelines

PhASAR mostly adheres to the LLVM coding guidelines that can be found here:

In addition, we kindly ask you to make use of our code formatting and transformation pre-commit hook before you check-in your code to PhASAR.

To ensure that our pre-commit hook is automatically run before a commit is created, please install the hook by running the following commands in PhASAR's root directory:

$ pip install pre-commit
$ pre-commit install

Use the following script to run some very useful clang-tidy checks (and automated fixes) on the entire code base. This script runs a lot of clang-tidy checks and may be potentially expensive. You may wish to run it only once in a while, but definitely before you check-in any code.

$ cd PHASAR_ROOT
$ utils/run-phasar-checks.sh

An automated mechanism that automatically runs clang-tidy checks during the build process is currently under development and will be finished soon. We will update this page accordingly, then.

Clone this wiki locally