Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
5e13fe66
Unverified
Commit
5e13fe66
authored
Sep 25, 2018
by
Gennadiy Civil
Committed by
GitHub
Sep 25, 2018
Browse files
Merge branch 'master' into appveyor-mingw-enable-tests-again
parents
0e161c3c
b19266a3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
.travis.yml
.travis.yml
+3
-1
ci/test_format.sh
ci/test_format.sh
+33
-0
No files found.
.travis.yml
View file @
5e13fe66
...
...
@@ -18,8 +18,9 @@ matrix:
-
os
:
linux
compiler
:
clang
sudo
:
true
env
:
TEST_CLANG_FORMAT="yes"
install
:
./ci/install-linux.sh && ./ci/log-config.sh
script
:
./ci/build-linux-bazel.sh
script
:
./ci/test_format.sh &&
./ci/build-linux-bazel.sh
-
os
:
linux
group
:
deprecated-2017Q4
compiler
:
gcc
...
...
@@ -65,6 +66,7 @@ addons:
packages
:
-
g++-4.9
-
clang-3.9
-
clang-format-3.9
notifications
:
email
:
false
ci/test_format.sh
0 → 100755
View file @
5e13fe66
#!/bin/bash
echo
"clang-format - checking Code Formatting..."
if
[[
"
${
TRAVIS_OS_NAME
}
"
==
"linux"
]]
&&
\
[[
"
${
TEST_CLANG_FORMAT
}
"
==
"yes"
]]
;
then
RETURN
=
0
CLANG_FORMAT
=
"clang-format-3.9"
which clang-format-3.9
if
[
!
-f
".clang-format"
]
;
then
echo
".clang-format file not found!"
exit
1
fi
FILES
=
`
git diff master
--name-only
|
grep
-E
"
\.
(cc|cpp|h)$"
`
for
FILE
in
$FILES
;
do
$CLANG_FORMAT
$FILE
| cmp
$FILE
>
/dev/null
if
[
$?
-ne
0
]
;
then
echo
"[!] Clang-Format Found INCORRECT FORMATTING. Please re-format and re-submit. The following file failed:
$FILE
"
>
&2
RETURN
=
1
fi
done
exit
$RETURN
fi
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment