diff --git a/.travis.yml b/.travis.yml index b179a1412..0f32bdb27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,9 @@ language: cpp compiler: g++ before_install: + # Enforce whitespace guidelines + - ./scripts/whitespace_check.sh + # g++4.8.1 - if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi - if [ "$CXX" == "g++" ]; then export CXX; fi diff --git a/scripts/whitespace_check.sh b/scripts/whitespace_check.sh new file mode 100755 index 000000000..ed1a05d60 --- /dev/null +++ b/scripts/whitespace_check.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# +# Enforce spaces instead of tabs +# + +ENFORCED_FILES="autowiring examples src CMakeLists.txt" + +# Go to root directory + +if grep -qr "\t" $ENFORCED_FILES +then + echo "The Autowiring project prohibits tabs for spacing." + echo "Tabs found in the following files:" + grep -rn "\t" $ENFORCED_FILES + exit 1 +fi diff --git a/src/autonet/AutoNetServer.cpp b/src/autonet/AutoNetServer.cpp index 943f6de8a..cd3b23e9a 100644 --- a/src/autonet/AutoNetServer.cpp +++ b/src/autonet/AutoNetServer.cpp @@ -6,5 +6,5 @@ AutoNetServer::AutoNetServer(): CoreThread("AutoNetServer") { } - + //lol tabs AutoNetServer::~AutoNetServer(){} diff --git a/src/autotesting/stdafx.h b/src/autotesting/stdafx.h index 14acc27d3..cf40bbfb2 100644 --- a/src/autotesting/stdafx.h +++ b/src/autotesting/stdafx.h @@ -7,7 +7,7 @@ #include #define NOMINMAX #endif - + #ifndef _MSC_VER #include #endif