openstack-helm-infra/zuul.d/playbooks/lint.yml
Roman Gorshunov 410d34317e Exclude PNG images from whitespace linting job
Image files could contain whitespace after carriage return and newline
characters; patch excludes "*.png" files from openstack-helm-lint job.

Change-Id: I6aef5f2f34637f018fd56a3bb8121d5829c600a2
2019-02-14 14:52:09 +01:00

24 lines
964 B
YAML

---
# Copyright 2018 SUSE LINUX GmbH.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- hosts: all[0]
tasks:
- name: Prevent trailing whitespaces
shell: find . \! \( -path "*/\.*" -o -path "*/doc/build/*" -o -name "*.tgz" -o -name "*.png" \) -type f -exec egrep -l " +$" {} \;
register: _found_whitespaces
failed_when: _found_whitespaces.stdout != ""
args:
chdir: "{{ ansible_user_dir }}/src/{{ zuul.project.canonical_name }}"