forked from UCL/STIR
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'white-space-config' into clean-master
- Loading branch information
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
Language : Cpp | ||
# BasedOnStyle : GNU | ||
AlwaysBreakAfterReturnType: TopLevelDefinitions | ||
AlwaysBreakTemplateDeclarations: true | ||
BraceWrapping: | ||
SplitEmptyFunction: false | ||
ColumnLimit: 130 | ||
IndentPPDirectives: AfterHash | ||
PointerAlignment: Left | ||
SortIncludes: false | ||
SortUsingDeclarations: false | ||
SpaceBeforeParens: ControlStatements | ||
Standard: Cpp11 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
repos: | ||
- repo: git://github.com/doublify/pre-commit-clang-format | ||
rev: master | ||
hooks: | ||
- id: clang-format | ||
files: \.(c|cc|cxx|cpp|h|hpp|hxx|inl|txx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Information specific for developers | ||
|
||
Please check files here for information/code practices for developers. | ||
|
||
- Do read our [contribution guidelines](../../CONTRIBUTING.md) | ||
- Set your editor settings appropriately: [instructions](editor-settings.md) | ||
- Install git hooks for serious development: [instructions](git-hooks.md) | ||
- Read the documentation, including the STIR developers guide |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Developer documentation: editor settings | ||
|
||
White-spaces and indentation with multiple developers are a pain. Please adhere to | ||
our white-space policy, which we try to enforce via [clang-format](https://clang.llvm.org/docs/ClangFormat.html). | ||
Check that site for integration with your editor/IDE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Developer documentation: how to install (software for) git hooks | ||
|
||
You first need to have Python and pip | ||
|
||
## Install [pre-commit](https://pre-commit.com) | ||
See https://pre-commit.com/#install but the following might work. | ||
|
||
pip install pre-commit | ||
|
||
If this fails with a permission error, try adding `--user` to the command. | ||
|
||
If that fails with a message about `PyYAML` and `distutils`, try | ||
|
||
pip install --ignore-installed PyYAML | ||
|
||
## Install clang-format | ||
### debian/Ubuntu | ||
sudo apt install clang-format | ||
### MacOS | ||
brew install clang-format | ||
### Others | ||
search the internet and tell us | ||
|
||
## Enable pre-commit hooks | ||
```sh | ||
cd /whereever/STIR | ||
pre-commit install | ||
``` |