Skip to content

Commit

Permalink
Merge pull request #66 from leapmotion/travis-disallowtabs
Browse files Browse the repository at this point in the history
Adding tab detection script to travis
  • Loading branch information
codemercenary committed Aug 21, 2014
2 parents f2ec82e + 7e15578 commit b5dcbc7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .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
Expand Down
19 changes: 19 additions & 0 deletions scripts/whitespace_check.sh
@@ -0,0 +1,19 @@
#!/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
echo "The Autowiring project prohibits tabs for spacing."
echo
echo "Tabs found in the following files:"
grep -rn $'\t' $ENFORCED_FILES
exit 1
fi
3 changes: 1 addition & 2 deletions src/autonet/AutoNetServer.cpp
Expand Up @@ -4,7 +4,6 @@

AutoNetServer::AutoNetServer():
CoreThread("AutoNetServer")
{
}
{}

AutoNetServer::~AutoNetServer(){}
2 changes: 1 addition & 1 deletion src/autotesting/stdafx.h
Expand Up @@ -9,7 +9,7 @@
#define NOMINMAX
#endif
#endif

#ifndef _MSC_VER
#include <stdlib.h>
#endif
Expand Down
8 changes: 4 additions & 4 deletions src/autowiring/interlocked.asm
Expand Up @@ -2,10 +2,10 @@
.code

interlocked_add PROC
mov eax, [esp + 4]
mov ecx, [esp + 8]
lock add [eax], ecx
ret
mov eax, [esp + 4]
mov ecx, [esp + 8]
lock add [eax], ecx
ret
interlocked_add ENDP

END

0 comments on commit b5dcbc7

Please sign in to comment.