[gnome-chess] Check for tabspaces in line in pre-commit hook
- From: Sahil Sareen <ssareen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] Check for tabspaces in line in pre-commit hook
- Date: Fri, 13 Mar 2015 14:40:21 +0000 (UTC)
commit 48d2f40f458c633bacce71265b70c816cd1f3bdd
Author: Sahil Sareen <sahil sareen hotmail com>
Date: Fri Mar 13 20:08:21 2015 +0530
Check for tabspaces in line in pre-commit hook
Add check for tabspaces in scripts/pre-commit
scripts/pre-commit | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/scripts/pre-commit b/scripts/pre-commit
index 44e1788..a370f77 100755
--- a/scripts/pre-commit
+++ b/scripts/pre-commit
@@ -64,7 +64,7 @@ def main():
printIssue( currLine, "is greater than 120 charecters" )
nIssues += 1
- # Lines with trailing white-space or tabs
+ # Lines with trailing white-space or tabspace
if getLineData( currLine ).endswith( ' \n' ):
printIssue( currLine, "has trailing whitespace" )
nIssues += 1
@@ -73,6 +73,11 @@ def main():
printIssue( currLine, "has trailing tabspace" )
nIssues += 1
+ # Lines with tabspace
+ if '\t' in getLineData( currLine ):
+ printIssue( currLine, "has tabspace" )
+ nIssues += 1
+
# Single whitespace before "{"
indexes = find( getLineData( currLine ), '{' )
for index in indexes:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]