Revert "Add clang format check to one of the builds"
This commit is contained in:
		@@ -18,9 +18,8 @@ matrix:
 | 
				
			|||||||
    - os: linux
 | 
					    - os: linux
 | 
				
			||||||
      compiler: clang
 | 
					      compiler: clang
 | 
				
			||||||
      sudo : true
 | 
					      sudo : true
 | 
				
			||||||
      env: TEST_CLANG_FORMAT="yes"
 | 
					 | 
				
			||||||
      install: ./ci/install-linux.sh && ./ci/log-config.sh
 | 
					      install: ./ci/install-linux.sh && ./ci/log-config.sh
 | 
				
			||||||
      script: ./ci/test_format.sh && ./ci/build-linux-bazel.sh
 | 
					      script: ./ci/build-linux-bazel.sh
 | 
				
			||||||
    - os: linux
 | 
					    - os: linux
 | 
				
			||||||
      group: deprecated-2017Q4
 | 
					      group: deprecated-2017Q4
 | 
				
			||||||
      compiler: gcc
 | 
					      compiler: gcc
 | 
				
			||||||
@@ -67,7 +66,6 @@ addons:
 | 
				
			|||||||
    packages:
 | 
					    packages:
 | 
				
			||||||
    - g++-4.9
 | 
					    - g++-4.9
 | 
				
			||||||
    - clang-3.9
 | 
					    - clang-3.9
 | 
				
			||||||
    - clang-format-3.9
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
notifications:
 | 
					notifications:
 | 
				
			||||||
  email: false
 | 
					  email: false
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,33 +0,0 @@
 | 
				
			|||||||
#!/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
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user