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
|
return_content: true
|
||||||
register: go_archive_checksum
|
register: go_archive_checksum
|
||||||
|
|
||||||
|
|
||||||
- name: Download go archive
|
- name: Download go archive
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://dl.google.com/go/go{{ go_version }}.{{ go_os }}-{{ go_arch }}.tar.gz"
|
url: "https://dl.google.com/go/go{{ go_version }}.{{ go_os }}-{{ go_arch }}.tar.gz"
|
||||||
|
@ -48,7 +48,6 @@
|
|||||||
loop_var: zj_pdf
|
loop_var: zj_pdf
|
||||||
when: zj_pdf.stat.exists
|
when: zj_pdf.stat.exists
|
||||||
|
|
||||||
|
|
||||||
- name: Return PDF artifact to Zuul
|
- name: Return PDF artifact to Zuul
|
||||||
zuul_return:
|
zuul_return:
|
||||||
data:
|
data:
|
||||||
|
@ -15,6 +15,6 @@
|
|||||||
uri:
|
uri:
|
||||||
url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/{{ zj_docker_tag.name }}/"
|
url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/{{ zj_docker_tag.name }}/"
|
||||||
method: DELETE
|
method: DELETE
|
||||||
status_code: [200,204]
|
status_code: [200, 204]
|
||||||
headers:
|
headers:
|
||||||
Authorization: "JWT {{ jwt_token.json.token }}"
|
Authorization: "JWT {{ jwt_token.json.token }}"
|
||||||
|
@ -23,6 +23,6 @@
|
|||||||
uri:
|
uri:
|
||||||
url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/change_{{ zuul.change }}_{{ image_tag }}/"
|
url: "https://hub.docker.com/v2/repositories/{{ zj_image.repository }}/tags/change_{{ zuul.change }}_{{ image_tag }}/"
|
||||||
method: DELETE
|
method: DELETE
|
||||||
status_code: [200,204]
|
status_code: [200, 204]
|
||||||
headers:
|
headers:
|
||||||
Authorization: "JWT {{ jwt_token.json.token }}"
|
Authorization: "JWT {{ jwt_token.json.token }}"
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
---
|
---
|
||||||
workdir: .
|
workdir: .
|
||||||
output: |
|
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: \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: [1;31mNo value for argument 'select_ds_for_volume' in method call[0m ([1;31mno-value-for-parameter[0m)
|
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: [1;31mNo value for argument 'get_adapter_type' in method call[0m ([1;31mno-value-for-parameter[0m)
|
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: [1;31mNo value for argument 'get_disk_type' in method call[0m ([1;31mno-value-for-parameter[0m)
|
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: [1;31mNo value for argument 'vops' in method call[0m ([1;31mno-value-for-parameter[0m)
|
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:
|
comments:
|
||||||
tests/__init__.py:
|
tests/__init__.py:
|
||||||
- line: 2808
|
- line: 2808
|
||||||
@ -18,4 +19,3 @@ comments:
|
|||||||
message: "E1120: No value for argument 'get_disk_type' in method call (no-value-for-parameter)"
|
message: "E1120: No value for argument 'get_disk_type' in method call (no-value-for-parameter)"
|
||||||
- line: 2812
|
- line: 2812
|
||||||
message: "E1120: No value for argument 'vops' in method call (no-value-for-parameter)"
|
message: "E1120: No value for argument 'vops' in method call (no-value-for-parameter)"
|
||||||
|
|
||||||
|
@ -84,7 +84,6 @@
|
|||||||
fi
|
fi
|
||||||
exit $GLOBAL_RESULT
|
exit $GLOBAL_RESULT
|
||||||
|
|
||||||
|
|
||||||
# The following test(s) require(s) the previous playbook
|
# The following test(s) require(s) the previous playbook
|
||||||
- name: Run the fetch-subunit-output role with multiple subunits
|
- name: Run the fetch-subunit-output role with multiple subunits
|
||||||
hosts: all
|
hosts: all
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
# has already installed from source. We might be able to test this
|
# has already installed from source. We might be able to test this
|
||||||
# once it's gone...
|
# once it's gone...
|
||||||
|
|
||||||
#- hosts: all
|
# - hosts: all
|
||||||
# roles:
|
# roles:
|
||||||
# - role: ensure-pip
|
# - role: ensure-pip
|
||||||
# vars:
|
# vars:
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
flake8
|
flake8
|
||||||
|
yamllint>=1.23.0
|
||||||
|
|
||||||
# We need to pin the ansible version directly here; per the
|
# We need to pin the ansible version directly here; per the
|
||||||
# deprecation policy it should trail the version used by Zuul by 4
|
# 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
|
whitelist_externals = bash
|
||||||
commands =
|
commands =
|
||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
|
yamllint -s -f parsable .
|
||||||
bash -c "find playbooks -type f -regex '.*.ya?ml' ! -regex '.*vars\/.*' -print0 | \
|
bash -c "find playbooks -type f -regex '.*.ya?ml' ! -regex '.*vars\/.*' -print0 | \
|
||||||
xargs -t -0 ansible-lint"
|
xargs -t -0 ansible-lint"
|
||||||
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d | \
|
bash -c 'find roles -maxdepth 1 -mindepth 1 -type d | \
|
||||||
|
@ -230,7 +230,6 @@
|
|||||||
|
|
||||||
The version of Node to use.
|
The version of Node to use.
|
||||||
|
|
||||||
|
|
||||||
.. zuul:jobvar:: javascript_content_dir
|
.. zuul:jobvar:: javascript_content_dir
|
||||||
:default: dist
|
:default: dist
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user