mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-17 09:47:34 +03:00
Add autoformat.sh script
This commit is contained in:
parent
f734c82b04
commit
8c9743121b
@ -11,7 +11,11 @@ Main code style rules:
|
||||
* no space between control statements and opening brackets
|
||||
|
||||
Alternatively, use the provided `.clang-format` file for
|
||||
[ClangFormat](https://clang.llvm.org/docs/ClangFormat.html) to format new code fragments, e.g.
|
||||
[ClangFormat](https://clang.llvm.org/docs/ClangFormat.html) to format new code
|
||||
fragments, e.g.
|
||||
|
||||
clang-format-3.8 -style=./contrib/.clang-format <source-or-header-file>
|
||||
clang-format-3.8 <path_to_file>
|
||||
|
||||
*Notice*: If you want to merge your changes from the repository cloned before
|
||||
autoformatting on all files in the _master_ repository, you may want to use the
|
||||
`autoformat.sh` script on your files before the merge.
|
||||
|
3
contrib/autoformat.sh
Executable file
3
contrib/autoformat.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
find ./src -path ./src/3rd_party -prune -o -iname *.h -o -iname *.cpp | xargs clang-format-3.8 -i
|
Loading…
Reference in New Issue
Block a user