Skip to content

Commit

Permalink
[doc] Remove unused clang format dev script
Browse files Browse the repository at this point in the history
Also, update the clang format file to reflect the current coding
style mentioned in the developer notes.
  • Loading branch information
MarcoFalke committed Jan 28, 2017
1 parent a7ea2f8 commit fa5137c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 71 deletions.
6 changes: 1 addition & 5 deletions contrib/devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ check-doc.py
Check if all command line args are documented. The return value indicates the
number of undocumented args.

clang-format.py
===============

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.

clang-format-diff.py
===================

Expand All @@ -24,6 +19,7 @@ the script should be called from the git root folder as follows.
```
git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v
```

copyright\_header.py
====================

Expand Down
62 changes: 0 additions & 62 deletions contrib/devtools/clang-format.py

This file was deleted.

7 changes: 4 additions & 3 deletions doc/developer-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ Developer Notes
Various coding styles have been used during the history of the codebase,
and the result is not very consistent. However, we're now trying to converge to
a single style, so please use it in new code. Old code will be converted
gradually.
gradually and you are encouraged to use the provided
[clang-format-diff script](/contrib/devtools/README.md#clang-format-diffpy)
to clean up the patch automatically before submitting a pull request.

- Basic rules specified in [src/.clang-format](/src/.clang-format).
Use a recent clang-format to format automatically using one of the [dev scripts]
(/contrib/devtools/README.md#clang-formatpy).
- Braces on new lines for namespaces, classes, functions, methods.
- Braces on the same line for everything else.
- 4 space indentation (no tabs) for every block except namespaces.
Expand Down
2 changes: 1 addition & 1 deletion src/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
Expand Down

0 comments on commit fa5137c

Please sign in to comment.