From cf2cdd7821b4c362240e2c2098307b7414271898 Mon Sep 17 00:00:00 2001 From: Vladimir Kozhukalov Date: Fri, 2 Feb 2024 14:06:55 -0600 Subject: [PATCH] Fix prevent trailing whitespace lint command Recently we added a jpg file to OSH documentation but the lint job didn't run due to the job configuration. But then for the next PR link job did run and failed due to trailing whitespace in the jpg file. Change-Id: I9abf8f93a4566411076190965f282375846dc5db --- playbooks/lint.yml | 2 +- zuul.d/jobs.yaml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/playbooks/lint.yml b/playbooks/lint.yml index 737e16aa2..5bddf845c 100644 --- a/playbooks/lint.yml +++ b/playbooks/lint.yml @@ -38,7 +38,7 @@ when: lint_osh is defined - name: Prevent trailing whitespaces - shell: find . \! \( -path "*/\.*" -o -path "*/doc/build/*" -o -name "*.tgz" -o -name "*.png" \) -type f -exec egrep -l " +$" {} \; + shell: find . \! \( -path "*/\.*" -o -path "*/doc/build/*" -o -name "*.tgz" -o -name "*.png" -o -name "*.jpg" \) -type f -exec grep -El " +$" {} \; register: _found_whitespaces failed_when: _found_whitespaces.stdout != "" args: diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index cb3f59455..532187d4e 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -22,7 +22,6 @@ - openstack/openstack-helm-infra irrelevant-files: - ^.*\.rst$ - - ^doc/.*$ - ^releasenotes/.*$ - job: