HenningScheufler / FormatFoam

FormatFoam

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

install clang format

sudo apt-get install clang-format

refactor the entire project with the specified files

./formatOF.sh clangFormat_Proposed
./formatOF.sh clangFormat_Mozzilla

clang-format -i --style=file: src/finiteVolume/fvMesh/fvMesh.C

compile

navigate to the root

source etc/bashrc

and compile OpenFOAM

./Allwmake

Caveat

Some of the macro have line break after the definition of the function resulting in a compilation error after formatting:

define addToRunTimeSelectionTable\
(baseType,thisType,argNames)                                                   \

By applying the patch, this issue can be resolved:

define addToRunTimeSelectionTable(baseType,thisType,argNames)                                                   \

The tested formatter are able to compile OpenFOAM

About

FormatFoam

License:Other


Languages

Language:C++ 50.3%Language:C 47.5%Language:Shell 2.0%Language:Python 0.1%Language:M4 0.1%Language:CMake 0.0%Language:Awk 0.0%Language:Makefile 0.0%Language:Gnuplot 0.0%Language:sed 0.0%Language:GLSL 0.0%