summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-08-06 18:49:02 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-08-13 17:27:08 +0000
commit3e3a8810af63d7f737cfce1ff9bc684027ffdb62 (patch)
treee78af26da5acf73b0749e159da124712c09528cf
parenta509d253240abd96665675fed7513f6cdeec04de (diff)
Use tokstyle in the cmake travis build.
This checks that (some of) the code follows some simplicity and naming guidelines set by the tool.
-rwxr-xr-x.travis/cmake-linux18
1 files changed, 18 insertions, 0 deletions
diff --git a/.travis/cmake-linux b/.travis/cmake-linux
index bbfb7a96..347034af 100755
--- a/.travis/cmake-linux
+++ b/.travis/cmake-linux
@@ -8,7 +8,22 @@ CACHEDIR="$HOME/cache"
8NPROC=`nproc` 8NPROC=`nproc`
9ASTYLE="$CACHEDIR/astyle/build/gcc/bin/astyle" 9ASTYLE="$CACHEDIR/astyle/build/gcc/bin/astyle"
10 10
11install_tool() {
12 SLUG="$1"
13 TOOL="$2"
14 TARGET="$3"
15
16 VERSION=$(curl -L -s -H 'Accept: application/json' \
17 "https://github.com/$SLUG/releases/latest" \
18 | egrep -o '"v[0-9][^"]+"' \
19 | egrep -o '[^"]+')
20 URL="https://github.com/$SLUG/releases/download/$VERSION/$TOOL-x86_64-linux-$VERSION.tar.gz"
21 curl -L -s "$URL" | tar xzv -C "$TARGET"
22}
23
11travis_install() { 24travis_install() {
25 install_tool TokTok/hs-tokstyle tokstyle "$HOME/.local"
26
12 which coveralls || { 27 which coveralls || {
13 # Install cpp-coveralls to upload test coverage results. 28 # Install cpp-coveralls to upload test coverage results.
14 pip install --user ndg-httpsclient urllib3[secure] cpp-coveralls 29 pip install --user ndg-httpsclient urllib3[secure] cpp-coveralls
@@ -57,6 +72,9 @@ travis_script() {
57 72
58 other/astyle/format-source . "$ASTYLE" 73 other/astyle/format-source . "$ASTYLE"
59 74
75 echo "Running TokTok style checker"
76 "$HOME/.local/bin/check-cimple"
77
60 # Use () to run in a separate process so the exports are local. 78 # Use () to run in a separate process so the exports are local.
61 (run_static_analysis) 79 (run_static_analysis)
62 80