Commits (2)
BasedOnStyle: Mozilla
# Break before braces, except for one-line statements
BreakBeforeBraces: Allman
# Do not break before assignment operators
BreakBeforeBinaryOperators: NonAssignment
......@@ -4,3 +4,6 @@
[submodule "plugins/vendor/googletest"]
path = plugins/vendor/googletest
url = https://github.com/google/googletest.git
[submodule "plugins/vendor/clang-format-hooks"]
path = plugins/vendor/clang-format-hooks
url = https://github.com/barisione/clang-format-hooks.git
......@@ -5,6 +5,9 @@
### Added
* Extended Miller scaling adapter with additional porosity scaling !122
* Coding style tools and instructions.
as Git submodule !203
### Changed
......@@ -68,6 +68,41 @@ templates. Provide information on how your code changes and additions solve the
problem or implement the feature. Make sure that your MR fulfills the the
criteria for being merged.
#### C++ Coding Style
The DORiE repository contains a `.clang-format` file in the top-level directory specifying the desired style for C++ code in DORiE.
We ask developers to use this style when writing new code, ideally by instructing their editor and/or [ClangFormat](https://clang.llvm.org/docs/ClangFormat.html) tool to do so.
Every change to C++ files introduced by Git commits should be formatted according to this style.
DORiE vendors [clang-format-hooks](https://github.com/barisione/clang-format-hooks) to automate formatting and avoid committing unformated changes.
It contains a Git pre-commit hook which checks the changes right before committing.
If the changes to not comply to the coding style, the user is shown the suggested style and prompted to apply the changes or abort the commit.
Follow these instructions for registering the hook:
1. Install `clang-format`.
On **macOS**:
brew install clang-format
On **Ubuntu**:
apt install clang-format
2. Register the hook. From the top-level DORiE source directory, execute
./plugins/vendor/clang-format-hooks/git-pre-commit-format install
When running in trouble, consult the [original installation instructions](https://github.com/barisione/clang-format-hooks#setup).
Happy coding!
### Releases
Tasks for creating and publishing a release are listed in the `version-rollout`
Subproject commit ac35e705ebf20187b7ff92c29d1411f6a4c8d522