Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
update .travis.yml for oclint
Browse files Browse the repository at this point in the history
  • Loading branch information
wrmswindmill committed Jul 22, 2019
1 parent bfc7a40 commit 7a5f6b0
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ matrix:
components:
- android-26
- extra-android-m2repository
- env: STATIC_CODE_ANALYSIS=true
language: objective-c
osx_image: xcode7.2
cache:
directories:
- npm
Expand All @@ -42,6 +45,14 @@ cache:
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

before_install:
if [[ "${STATIC_CODE_ANALYSIS}" = "true" ]]; then
- brew cask uninstall oclint
- brew tap oclint/formulae
- brew install oclint
fi

install:
- |
case $TEST_SUITE in
Expand Down Expand Up @@ -69,6 +80,7 @@ install:
npm install
;;
esac
script:
- |
case $TEST_SUITE in
Expand Down Expand Up @@ -110,6 +122,25 @@ script:
fi
;;
esac
if [[ "${STATIC_CODE_ANALYSIS}" = "true" ]]; then
cd ios/sdk && xcodebuild | xcpretty -r json-compilation-database -o compile_commands.json
oclint-json-compilation-database oclint_args -- \
-disable-rule=ShortVariableName \
-disable-rule=LongLine \
-disable-rule=LongMethod \
-disable-rule=HighNcssMethod \
-disable-rule=LongVariableName \
-disable-rule=HighCyclomaticComplexity \
-disable-rule=HighNPathComplexity \
-disable-rule=UnusedLocalVariable \
-disable-rule=DoubleNegative \
-disable-rule=MultipleUnaryOperator \
-disable-rule=DeepNestedBlock \
-max-priority-1=15000 \
-max-priority-2=15000 \
-max-priority-3=15000 \
fi
notifications:
webhooks:
on_pull_requests: false
Expand Down

0 comments on commit 7a5f6b0

Please sign in to comment.