Loading .astylerc 0 → 100644 +26 −0 Original line number Diff line number Diff line # Bracket Style style=kr # K&R brackets # Indentation indent=force-tab=8 # Use tabs for indentation, spaces for minor alignment min-conditional-indent=0 # Padding unpad-paren # Remove all spaces with parens that aren't requested below pad-oper # Put spaces around operators pad-header # Put spaces between if/while/for etc. and the first paren # Pointers align-pointer=name # Align the * next to the variable name # Line wrapping max-code-length=100 # 100 character line limit break-after-logical # For if statements, wrap to the next line after logical operator # Line endings lineend=linux # LF line endings # General options suffix=none recursive formatted autobuild.sh +2 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,8 @@ DPDK_DIR=/usr/local/dpdk-2.1.0/x86_64-native-linuxapp-gcc cd $src ./scripts/check_format.sh scanbuild='' if hash scan-build; then scanbuild="scan-build -o $out/scan-build-tmp --status-bugs" Loading scripts/check_format.sh 0 → 100755 +32 −0 Original line number Diff line number Diff line #!/usr/bin/env bash readonly BASEDIR=$(readlink -f $(dirname $0))/.. cd $BASEDIR # exit on errors set -e if hash astyle; then echo -n "Checking coding style..." rm -f astyle.log touch astyle.log astyle --options=.astylerc "*.c" >> astyle.log astyle --options=.astylerc "*.h" >> astyle.log if grep -q "^Formatted" astyle.log; then echo " errors detected" sed -i -e 's/ / /g' astyle.log grep --color=auto "^Formatted.*" astyle.log echo "Incorrect code style detected in one or more files." echo "The files have been automatically formatted." echo "Remember to add the files to your commit." rm -f astyle.log exit 1 fi echo " OK" rm -f astyle.log else echo "You do not have astyle installed so your code style is not being checked!" exit 0 fi exit 0 Loading
.astylerc 0 → 100644 +26 −0 Original line number Diff line number Diff line # Bracket Style style=kr # K&R brackets # Indentation indent=force-tab=8 # Use tabs for indentation, spaces for minor alignment min-conditional-indent=0 # Padding unpad-paren # Remove all spaces with parens that aren't requested below pad-oper # Put spaces around operators pad-header # Put spaces between if/while/for etc. and the first paren # Pointers align-pointer=name # Align the * next to the variable name # Line wrapping max-code-length=100 # 100 character line limit break-after-logical # For if statements, wrap to the next line after logical operator # Line endings lineend=linux # LF line endings # General options suffix=none recursive formatted
autobuild.sh +2 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,8 @@ DPDK_DIR=/usr/local/dpdk-2.1.0/x86_64-native-linuxapp-gcc cd $src ./scripts/check_format.sh scanbuild='' if hash scan-build; then scanbuild="scan-build -o $out/scan-build-tmp --status-bugs" Loading
scripts/check_format.sh 0 → 100755 +32 −0 Original line number Diff line number Diff line #!/usr/bin/env bash readonly BASEDIR=$(readlink -f $(dirname $0))/.. cd $BASEDIR # exit on errors set -e if hash astyle; then echo -n "Checking coding style..." rm -f astyle.log touch astyle.log astyle --options=.astylerc "*.c" >> astyle.log astyle --options=.astylerc "*.h" >> astyle.log if grep -q "^Formatted" astyle.log; then echo " errors detected" sed -i -e 's/ / /g' astyle.log grep --color=auto "^Formatted.*" astyle.log echo "Incorrect code style detected in one or more files." echo "The files have been automatically formatted." echo "Remember to add the files to your commit." rm -f astyle.log exit 1 fi echo " OK" rm -f astyle.log else echo "You do not have astyle installed so your code style is not being checked!" exit 0 fi exit 0