Enable yamllint
Adds yamllint to the linters with a minimal configuration, some rules are disabled to allow us to fix them in follow-ups, if we agree on them. Fixes invalid YAML file containing characters inside block. Fixes few minor linting issues. Change-Id: I936fe2c997597972d884c5fc62655d28e8aaf8c5
This commit is contained in:
parent
95a9562b81
commit
33461bbecc
20
.yamllint
Normal file
20
.yamllint
Normal file
@ -0,0 +1,20 @@
|
||||
extends: default
|
||||
ignore: |
|
||||
.tox
|
||||
|
||||
rules:
|
||||
braces:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
brackets:
|
||||
max-spaces-inside: 1
|
||||
level: error
|
||||
comments-indentation: disable
|
||||
document-start: disable
|
||||
empty-lines:
|
||||
max: 1
|
||||
max-end: 2
|
||||
indentation: disable
|
||||
new-line-at-end-of-file: disable
|
||||
line-length: disable
|
||||
truthy: false
|
@ -9,7 +9,6 @@
|
||||
return_content: true
|
||||
register: go_archive_checksum
|
||||
|
||||
|
||||
- name: Download go archive
|
||||
get_url:
|
||||
url: "https://dl.google.com/go/go{{ go_version }}.{{ go_os }}-{{ go_arch }}.tar.gz"
|
||||
|
@ -48,7 +48,6 @@
|
||||
loop_var: zj_pdf
|
||||
when: zj_pdf.stat.exists
|
||||
|
||||
|
||||
- name: Return PDF artifact to Zuul
|
||||
zuul_return:
|
||||
data:
|
||||
|
@ -1,11 +1,12 @@
|
||||
---
|
||||
workdir: .
|
||||
output: |
|
||||
tests/__init__.py:2808:8: E1120: [1;31mNo value for argument 'get_storage_profile_id' in method call[0m ([1;31mno-value-for-parameter[0m)
|
||||
tests/__init__.py:2808:8: E1120: [1;31mNo value for argument 'select_ds_for_volume' in method call[0m ([1;31mno-value-for-parameter[0m)
|
||||
tests/__init__.py:2812:8: E1120: [1;31mNo value for argument 'get_adapter_type' in method call[0m ([1;31mno-value-for-parameter[0m)
|
||||
tests/__init__.py:2812:8: E1120: [1;31mNo value for argument 'get_disk_type' in method call[0m ([1;31mno-value-for-parameter[0m)
|
||||
tests/__init__.py:2812:8: E1120: [1;31mNo value for argument 'vops' in method call[0m ([1;31mno-value-for-parameter[0m)
|
||||
output: "\
|
||||
tests/__init__.py:2808:8: E1120: \e[1;31mNo value for argument 'get_storage_profile_id' in method call\e[0m (\e[1;31mno-value-for-parameter\e[0m)\n\
|
||||
tests/__init__.py:2808:8: E1120: \e[1;31mNo value for argument 'select_ds_for_volume' in method call\e[0m (\e[1;31mno-value-for-parameter\e[0m)\n\
|
||||
tests/__init__.py:2812:8: E1120: \e[1;31mNo value for argument 'get_adapter_type' in method call\e[0m (\e[1;31mno-value-for-parameter\e[0m)\n\
|
||||
tests/__init__.py:2812:8: E1120: \e[1;31mNo value for argument 'get_disk_type' in method call\e[0m (\e[1;31mno-value-for-parameter\e[0m)\n\
|
||||
tests/__init__.py:2812:8: E1120: \e[1;31mNo value for argument 'vops' in method call\e[0m (\e[1;31mno-value-for-parameter\e[0m)\n\
|
||||
"
|
||||
comments:
|
||||
tests/__init__.py:
|
||||
- line: 2808
|
||||
@ -18,4 +19,3 @@ comments:
|
||||
message: "E1120: No value for argument 'get_disk_type' in method call (no-value-for-parameter)"
|
||||
- line: 2812
|
||||
message: "E1120: No value for argument 'vops' in method call (no-value-for-parameter)"
|
||||
|
||||
|
@ -84,7 +84,6 @@
|
||||
fi
|
||||
exit $GLOBAL_RESULT
|
||||
|
||||
|
||||
# The following test(s) require(s) the previous playbook
|
||||
- name: Run the fetch-subunit-output role with multiple subunits
|
||||
hosts: all
|
||||
|
@ -2,6 +2,7 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
flake8
|
||||
yamllint>=1.23.0
|
||||
|
||||
# We need to pin the ansible version directly here; per the
|
||||
# deprecation policy it should trail the version used by Zuul by 4
|
||||
|
1
tox.ini
1
tox.ini
@ -39,6 +39,7 @@ setenv =
|
||||
whitelist_externals = bash
|
||||
commands =
|
||||
flake8 {posargs}
|
||||
yamllint -s -f parsable .
|
||||
bash -c "find playbooks -type f -regex '.*.ya?ml' ! -regex '.*vars\/.*' -print0 | \
|
||||
xargs -t -0 ansible-lint"
|
||||
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d | \
|
||||
|
@ -230,7 +230,6 @@
|
||||
|
||||
The version of Node to use.
|
||||
|
||||
|
||||
.. zuul:jobvar:: javascript_content_dir
|
||||
:default: dist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user