diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-14 13:16:41 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-14 22:38:40 +0300 |
commit | fe64238b4cd5a7da403a4f29a62b14234ecba569 (patch) | |
tree | c7dd7ec87cfff3d32d715c37a6db33b711f40ae8 | |
parent | deea0c41a2306dd0af505fdd4e6bfe1bf1bf7bbb (diff) | |
download | qtlocation-mapboxgl-fe64238b4cd5a7da403a4f29a62b14234ecba569.tar.gz |
[tidy] Switched to Travis CI
Fixes https://github.com/mapbox/mapbox-gl-native/issues/5341.
-rw-r--r-- | .clang-tidy | 4 | ||||
m--------- | .mason | 0 | ||||
-rw-r--r-- | .travis.yml | 11 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | platform/osx/bitrise-tidy.yml | 53 | ||||
-rwxr-xr-x | scripts/clang-tidy.sh | 5 |
6 files changed, 18 insertions, 59 deletions
diff --git a/.clang-tidy b/.clang-tidy index ebb5531ea6..4358e3bb3f 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,2 +1,2 @@ -Checks: 'modernize-*,misc-static-assert,llvm-namespace-comment,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-core.uninitialized.UndefReturn' -HeaderFilterRegex: 'mbgl' +Checks: 'modernize-*,misc-static-assert,llvm-namespace-comment,-clang-analyzer-security.insecureAPI.rand,-clang-analyzer-core.uninitialized.UndefReturn,-clang-analyzer-core.StackAddressEscape,-clang-analyzer-core.CallAndMessage' +HeaderFilterRegex: '\/mbgl\/' diff --git a/.mason b/.mason -Subproject 0d06890655b5f2995682ea5b73aeb94010f8c89 +Subproject 56e8cd4b8128f456356f999d215816618f47e57 diff --git a/.travis.yml b/.travis.yml index eb7e2668f2..56f34a90be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -104,6 +104,17 @@ matrix: env: BUILDTYPE=Release _CXX=clang++-3.5 _CC=clang-3.5 addons: *clang35 + # Clang 3.5 - tidy + - os: linux + sudo: required + dist: trusty + language: cpp + compiler: "tidy-clang35-release" + env: BUILDTYPE=Release _CXX=clang++-3.5 _CC=clang-3.5 + addons: *clang35 + script: + - make tidy + # Qt 4 - Release - os: linux sudo: false @@ -306,12 +306,12 @@ compdb-macos: platform/macos/platform.gyp $(MACOS_OUTPUT_PATH)/config.gypi tidy: compdb tidy-$(HOST_PLATFORM) tidy-linux: - if test -z $(CLANG_TIDY); then .mason/mason install clang-tidy 3.8; fi + if test -z $(CLANG_TIDY); then .mason/mason install clang-tidy 3.8.0; fi deps/ninja/ninja-linux -C $(LINUX_OUTPUT_PATH)/$(BUILDTYPE) headers scripts/clang-tidy.sh $(LINUX_OUTPUT_PATH)/$(BUILDTYPE) tidy-macos: - if test -z $(CLANG_TIDY); then .mason/mason install clang-tidy 3.8; fi + if test -z $(CLANG_TIDY); then .mason/mason install clang-tidy 3.8.0; fi deps/ninja/ninja-macos -C $(MACOS_OUTPUT_PATH)/$(BUILDTYPE) headers scripts/clang-tidy.sh $(MACOS_OUTPUT_PATH)/$(BUILDTYPE) diff --git a/platform/osx/bitrise-tidy.yml b/platform/osx/bitrise-tidy.yml deleted file mode 100644 index e159134c84..0000000000 --- a/platform/osx/bitrise-tidy.yml +++ /dev/null @@ -1,53 +0,0 @@ -format_version: 1.1.0 -default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git - -trigger_map: -- pattern: "*" - is_pull_request_allowed: true - workflow: primary - -workflows: - primary: - steps: - - script: - title: Check for skipping CI - inputs: - - content: |- - #!/bin/bash - if [[ -n "$(echo $GIT_CLONE_COMMIT_MESSAGE_SUBJECT | sed -n '/\[skip ci\]/p')" || - -n "$(echo $GIT_CLONE_COMMIT_MESSAGE_SUBJECT | sed -n '/\[ci skip\]/p')" || - -n "$(echo $GIT_CLONE_COMMIT_MESSAGE_BODY | sed -n 's/\[skip ci\]/p')" || - -n "$(echo $GIT_CLONE_COMMIT_MESSAGE_BODY | sed -n 's/\[ci skip\]/p')" ]]; then - envman add --key SKIPCI --value true - else - envman add --key SKIPCI --value false - fi - - script: - title: Run build script - run_if: '{{enveq "SKIPCI" "false"}}' - inputs: - - content: |- - #!/bin/bash - set -eu -o pipefail - export BUILDTYPE=Release - make compdb - make tidy - - is_debug: 'no' - - slack: - title: Post to Slack - run_if: '{{enveq "SKIPCI" "false"}}' - inputs: - - webhook_url: "$SLACK_HOOK_URL" - - channel: "#gl-bots" - - from_username: 'Bitrise clang-tidy' - - from_username_on_error: 'Bitrise clang-tidy' - - message: '<${BITRISE_BUILD_URL}|Build #${BITRISE_BUILD_NUMBER}> - for <https://github.com/mapbox/mapbox-gl-native/compare/${BITRISE_GIT_BRANCH}|mapbox/mapbox-gl-native@${BITRISE_GIT_BRANCH}> - by ${GIT_CLONE_COMMIT_COMMITER_NAME} - passed' - - message_on_error: '<${BITRISE_BUILD_URL}|Build #${BITRISE_BUILD_NUMBER}> - for <https://github.com/mapbox/mapbox-gl-native/compare/${BITRISE_GIT_BRANCH}|mapbox/mapbox-gl-native@${BITRISE_GIT_BRANCH}> - by ${GIT_CLONE_COMMIT_COMMITER_NAME} - failed' - - icon_url: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-icon-128.png - - icon_url_on_error: https://bitrise-public-content-production.s3.amazonaws.com/slack/bitrise-slack-error-icon-128.png diff --git a/scripts/clang-tidy.sh b/scripts/clang-tidy.sh index ad86ed3f12..7665180cf7 100755 --- a/scripts/clang-tidy.sh +++ b/scripts/clang-tidy.sh @@ -5,7 +5,7 @@ set -o pipefail export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason" -CLANG_TIDY=${CLANG_TIDY:-$(mason prefix clang-tidy 3.8)/bin/clang-tidy} +CLANG_TIDY=${CLANG_TIDY:-$(mason prefix clang-tidy 3.8.0)/bin/clang-tidy} command -v ${CLANG_TIDY} >/dev/null 2>&1 || { echo "Can't find ${CLANG_TIDY} in PATH." @@ -18,9 +18,10 @@ command -v ${CLANG_TIDY} >/dev/null 2>&1 || { cd $1 function check_tidy() { + echo "Checking $0..." OUTPUT=$(${CLANG_TIDY} -p=$PWD $0 2>/dev/null) if [[ -n $OUTPUT ]]; then - echo "Error: A clang-tidy warning/error happened:" + echo "Caught clang-tidy warning/error:" echo -e "$OUTPUT" exit 1 fi |