diff --git a/.travis.yml b/.travis.yml index b2434070e1..82d7bc446e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,6 +45,9 @@ matrix: components: - android-26 - extra-android-m2repository + + - env: FORMAT_CODE=true + language: ruby cache: directories: @@ -96,6 +99,12 @@ install: cd ../../ fi +before_script: + - | + if [[ ("FORMAT_CODE" = "true" )]]; then + bundle exec danger + fi + script: - | case $TEST_SUITE in diff --git a/Dangerfile b/Dangerfile new file mode 100644 index 0000000000..09a01c3b62 --- /dev/null +++ b/Dangerfile @@ -0,0 +1,2 @@ +message("Hello, this worked") +code_style_validation.check file_extensions: ['.cc', '.cpp', '.m', 'mm', '.h', '.java'] \ No newline at end of file diff --git a/dangerfile.js b/dangerfile.js index 89572796c8..f8d224574e 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -476,10 +476,6 @@ function findBlameReviewers(fileToDeletedLinesMap, fileToNormalLinesMap, fileToB message("According to the blame info, we recommended " + names.join(' , ') + " to be the reviewers.") } } - -// code format using danger-code_style_validation based on clang-format -code_style_validation.check file_extensions: ['.hpp', '.cpp', '.m' , '.h', 'mm', '.cc', '.java'] - message('danger test finished.') /* * find reviewer end