diff options
author | Anthony Barbier <anthony.barbier@arm.com> | 2017-09-04 18:44:23 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 13:03:09 +0100 |
commit | 6ff3b19ee6120edf015fad8caab2991faa3070af (patch) | |
tree | a7a6dcd16dfd56d79fa1b56a313caeebcc939b68 /scripts/fix_code_formatting.sh | |
download | ComputeLibrary-6ff3b19ee6120edf015fad8caab2991faa3070af.tar.gz |
COMPMID-344 Updated doxygen
Change-Id: I32f7b84daa560e460b77216add529c8fa8b327ae
Diffstat (limited to 'scripts/fix_code_formatting.sh')
-rwxr-xr-x | scripts/fix_code_formatting.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/scripts/fix_code_formatting.sh b/scripts/fix_code_formatting.sh new file mode 100755 index 0000000000..2ab3c1d532 --- /dev/null +++ b/scripts/fix_code_formatting.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +ASTYLE_PARAMETERS=" --style=ansi \ + --indent=spaces \ + --indent-switches \ + --indent-col1-comments \ + --min-conditional-indent=0 \ + --max-instatement-indent=120 \ + --pad-oper \ + --align-pointer=name \ + --align-reference=name \ + --break-closing-brackets \ + --keep-one-line-statements \ + --max-code-length=200 \ + --mode=c \ + --lineend=linux \ + --indent-preprocessor \ + " + +DIRECTORIES="./arm_compute ./src ./examples ./tests ./utils" + +if [ $# -eq 0 ] +then + files=$(find $DIRECTORIES -type f \( -name \*.cpp -o -iname \*.h -o -name \*.inl -o -name \*.cl \)) +else + files=$@ +fi +for f in $files +do + sed -i 's/\t/ /g' $f + clang-format -i -style=file $f + astyle -n -q $ASTYLE_PARAMETERS $f +done |