summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/util/checkwhite
diff options
context:
space:
mode:
authorRaphael Langella <raphael.langella@gmail.com>2012-06-06 12:08:27 +0200
committerRaphael Langella <raphael.langella@gmail.com>2012-06-06 12:14:23 +0200
commit7e5f9fd891f712d76d7c2a8edcd9e0e1e899bc4f (patch)
treefd38f7386208f9a4facf8e1b28c26922239fc5be /crawl-ref/source/util/checkwhite
parent3afda0269267eed331f7730beefdb6a34af8236f (diff)
downloadcrawl-ref-7e5f9fd891f712d76d7c2a8edcd9e0e1e899bc4f.tar.gz
crawl-ref-7e5f9fd891f712d76d7c2a8edcd9e0e1e899bc4f.zip
Add an option to checkwhite to change the tab size.
Since crawl coding convention use 4 spaces indentation, people using tabs usually set them to 4 spaces. In my experience reviewing and pushing patches, I've actually never seen any patch with tabs of 8 spaces size.
Diffstat (limited to 'crawl-ref/source/util/checkwhite')
-rwxr-xr-xcrawl-ref/source/util/checkwhite7
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/util/checkwhite b/crawl-ref/source/util/checkwhite
index 78c687373e..90e088cea3 100755
--- a/crawl-ref/source/util/checkwhite
+++ b/crawl-ref/source/util/checkwhite
@@ -1,6 +1,13 @@
#!/usr/bin/perl -w
use Encode;
use Text::Tabs;
+use Getopt::Std;
+
+getopt('t');
+
+if ($opt_t) {
+ $tabstop = $opt_t;
+}
open FLIST, "git ls-files|" or die "Can't run git ls-files";