[PATCH] Add a gitlab-ci stage to test for tabs in C source code.

"Kevin J. McCarthy" <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
This is just a simple test using perl (which is already required for
the build).
---
 My perl-fu is weak, and I'm sure there is a much slicker way to do
 this.  However, this is simple and seems to work for now.

 .gitlab-ci.yml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d2416d1d..6aa14130 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@ image: registry.gitlab.com/muttmua/mutt/ubuntu:18.04
 
 stages:
   - shellcheck
+  - tabcheck
   # - pylint
   - build
   - deploy
@@ -11,6 +12,11 @@ shellcheck:
   script:
     - (find . -name \*.sh && echo "gen_defs muttbug prepare") | xargs shellcheck --exclude=SC2003,SC2006,SC2086,SC2162,SC2046
 
+tabcheck:
+  stage: tabcheck
+  script:
+    - find . -name '*.[ch]' -print0 | xargs -0 perl -n -e '/\t/ && die "tab found in $ARGV"'
+
 # pylint:
 #   stage: pylint
 #   image: python:3.8-slim
-- 
2.52.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.