From 22a4ead363adeb09b66831ffb99a9b49b8cab434 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Mon, 29 May 2023 16:59:10 +0100 Subject: [PATCH] ci: Improve detection of emacs line in more file types --- utils/tests/gitlab-ci-code-linting.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/utils/tests/gitlab-ci-code-linting.yml b/utils/tests/gitlab-ci-code-linting.yml index f53688c7d..7943bf5e0 100644 --- a/utils/tests/gitlab-ci-code-linting.yml +++ b/utils/tests/gitlab-ci-code-linting.yml @@ -94,9 +94,13 @@ emacs-line: stage: .pre image: ubuntu:latest script: - - (! egrep -rn --include="*.h" --include="*.cc" --include="*.py" "c-file-style:|py-indent-offset:" ) || - (echo "Found Emacs lines on the above C++ / Python files" && exit 1) - - echo "No Emacs lines found on C++ / Python files" + - if ( egrep -rn --include="*.h" --include="*.cc" --include="*.c" --include="*.py" --include="*.rst" "c-file-style:|py-indent-offset:" ) ; then + echo "Found Emacs lines on the above C/C++, Python and RST files" ; + exit 1 ; + else + echo "No Emacs lines found on C/C++, Python and RST files" ; + exit 0 ; + fi timeout: 1h # Spell checking