View on GitHub

Graphitti

A project to facilitate construction of high-performance neural simulations

Code Formatting Etiquettes

Code is written once and read a thousand times. Hence, it is important we keep our codebase consistent to improve readability. In this section, we will discuss all the coding formatting styles that must be followed while contributing to the Graphitti codebase. For C++ style/feature guide please refer to C++ design and Coding standards.

    if (x > m) {
        x--;
    } else {
        x++;
    }
    int f(a)
    {
        return a;
    }

clang-format

To help with adhering to our style guide, we developed a clang-format file to assit in this process.

Future development will include creating an automated workflow to do this for all .cpp and .h files on push or pull requests to master.

running clang-format through command line

clang-format fileName
clang-format -i fileName

« Go back to the Developer Documentation page


« Go back to the Graphitti home page