Skip to content

Coding rules

These rules summarize CONTRIBUTING.md of the hippoLBM repository.

Issues and pull requests

  • Use the GitHub issues for bugs (label bug) and feature requests; search for an existing issue first and give a reduced test case.
  • Ask first before starting a significant pull request (new feature, refactoring).
  • Keep pull requests focused: no unrelated commits. One reviewer is assigned; after one or two weeks without review, tag rprat-pro or carrardt.
  • Contributions are licensed under the Apache 2.0 License.

Style

  • Format the code with clang-format, using the style file at the root of the repository.
  • Members end with an underscore (name_), without m_ prefix.
  • Fatal errors: print a message with lout and call MPI_Abort(MPI_COMM_WORLD, EXIT_FAILURE).
  • Each operator has a documentation() with a YAML example, and a DocString for each slot: they feed hippoLBM --help and the Exhaustive Operator List.
  • Commit messages are written in the imperative mood ("add operator", not "added operator").

Tests

Run ctest before submitting, and add tests for new features (see Tests).