The following list provides the general formatting/indentation rules for GROMACS code (C/C++):
Additionally:
Most of the above guidelines are enforced using uncrustify, an automatic source code formatting tool. The copyright guidelines are enforced by a separate Python script. See Automatic source code formatting for details. Note that due to the nature of uncrustify (it only does all-or-nothing formatting), it enforces several additional formatting rules in addition to those above.
Enforcing a consistent formatting has a few advantages: