From 73e4fcd03303db57ec7b25eafd2428a4637e513b Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Thu, 10 Mar 2016 17:16:41 +0100 Subject: [PATCH] ensure the no-tab rule * HACKING: Mention the no-tab rule. * tests/sanity/style.test: Only test for it at the beginning of line. --- HACKING | 3 +++ tests/sanity/style.test | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HACKING b/HACKING index 8fe87f1c2..a46d09792 100644 --- a/HACKING +++ b/HACKING @@ -278,6 +278,9 @@ Encoding * Use UTF-8 for non-ASCII characters. + * Do not use tabs for indentation in C++ files. Use only space to + prevent issues with people assuming different tab widths. + * If you edit files encoded in Latin-1 (the original default encoding for the project), feel free to convert them to UTF-8. In emacs the simplest way to convert the file is to add a comment diff --git a/tests/sanity/style.test b/tests/sanity/style.test index ca3547aa7..cbf40985b 100755 --- a/tests/sanity/style.test +++ b/tests/sanity/style.test @@ -289,8 +289,8 @@ for dir in "$TOP/spot" "$TOP/bin" "$TOP/tests"; do $GREP '#.*include.*' $tmp && diag 'Avoid in headers, better use .' fi - e$GREP ' ' $tmp && - diag 'Use spaces instead of tabular.' + $GREP '^[ ]* ' $tmp && + diag 'Use spaces instead of tabs.' # Headers from spot/priv/ are not installed, so may only be # included from *.cc files or from other spot/priv/ headers # (in the latter case they do not have to specify the priv/