File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -106,15 +106,7 @@ matrix:
106
106
- astyle --version
107
107
script :
108
108
# only changed files to be checked for astyle
109
- - COMMIT_RANGE=${TRAVIS_COMMIT_RANGE/.../..}
110
- - if [! git diff --quiet "$COMMIT_RANGE" -- ]
111
- then
112
- COMMIT_CONTENT=`git diff-tree --no-commit-id --name-only -r $TRAVIS_COMMIT`
113
- else
114
- COMMIT_CONTENT=`git diff --name-only $COMMIT_RANGE`
115
- fi
116
- - echo $COMMIT_CONTENT
117
- - find -regex '.*\.\(h\|c\|hpp\|cpp\)' -type f | fgrep -v -f .astyleignore | $COMMIT_CONTENT | xargs -n 100 -I {} bash -c "astyle -n --options=.astylerc \"{}\"" > astyle.out;
109
+ - git diff --name-only $TRAVIS_BRANCH | grep '.*\.\(h\|c\|hpp\|cpp\)' | fgrep -v -f .astyleignore | xargs -n 100 -I {} bash -c "astyle -n --options=.astylerc \"{}\"" > astyle.out;
118
110
if [ $(cat astyle.out | grep Formatted | wc -l) -ne 0 ]; then
119
111
git --no-pager diff;
120
112
echo "Please fix style issues as shown above";
You can’t perform that action at this time.
0 commit comments