Skip to content

Commit fa5137c

Browse files
author
MarcoFalke
committed
[doc] Remove unused clang format dev script
Also, update the clang format file to reflect the current coding style mentioned in the developer notes.
1 parent a7ea2f8 commit fa5137c

File tree

4 files changed

+6
-71
lines changed

4 files changed

+6
-71
lines changed

contrib/devtools/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ check-doc.py
88
Check if all command line args are documented. The return value indicates the
99
number of undocumented args.
1010

11-
clang-format.py
12-
===============
13-
14-
A script to format cpp source code according to [.clang-format](../../src/.clang-format). This should only be applied to new files or files which are currently not actively developed on. Also, git subtrees are not subject to formatting.
15-
1611
clang-format-diff.py
1712
===================
1813

@@ -24,6 +19,7 @@ the script should be called from the git root folder as follows.
2419
```
2520
git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v
2621
```
22+
2723
copyright\_header.py
2824
====================
2925

contrib/devtools/clang-format.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

doc/developer-notes.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ Developer Notes
44
Various coding styles have been used during the history of the codebase,
55
and the result is not very consistent. However, we're now trying to converge to
66
a single style, so please use it in new code. Old code will be converted
7-
gradually.
7+
gradually and you are encouraged to use the provided
8+
[clang-format-diff script](/contrib/devtools/README.md#clang-format-diffpy)
9+
to clean up the patch automatically before submitting a pull request.
10+
811
- Basic rules specified in [src/.clang-format](/src/.clang-format).
9-
Use a recent clang-format to format automatically using one of the [dev scripts]
10-
(/contrib/devtools/README.md#clang-formatpy).
1112
- Braces on new lines for namespaces, classes, functions, methods.
1213
- Braces on the same line for everything else.
1314
- 4 space indentation (no tabs) for every block except namespaces.

src/.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AlignTrailingComments: true
66
AllowAllParametersOfDeclarationOnNextLine: false
77
AllowShortBlocksOnASingleLine: false
88
AllowShortFunctionsOnASingleLine: All
9-
AllowShortIfStatementsOnASingleLine: false
9+
AllowShortIfStatementsOnASingleLine: true
1010
AllowShortLoopsOnASingleLine: false
1111
AlwaysBreakBeforeMultilineStrings: false
1212
AlwaysBreakTemplateDeclarations: true

0 commit comments

Comments
 (0)