From a016a1a565ceb21c8a86f76cc1763eebaf269063 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 28 Jul 2022 13:50:45 +1000 Subject: [PATCH] linters: standardise on newline at end of file I noticed this by accident when I ran ansible-lint over this repo from an outside context; it didn't use the .yamllint in here and started compalining about eof whitespace. After scratching my head for a bit as to why this didn't fail here, I realised we've allowed various newlines since the initial commit I936fe2c997597972d884c5fc62655d28e8aaf8c5. Remove this and just use the default eof rules, and fixup the whitespace as required. This is fairly unimportant, but is nice for consistency. Change-Id: Idb46a1f39ba798b0bf70eaa27b4c6b4758ce3d26 --- .yamllint | 3 --- playbooks/terraform/pre.yaml | 1 - playbooks/terraform/run.yaml | 1 - playbooks/tox-docs/pre.yaml | 1 - roles/build-docker-image/tasks/setup-buildx.yaml | 1 - roles/ensure-go/tasks/install-go.yaml | 1 - roles/ensure-packer/vars/main.yaml | 1 - roles/ensure-pip/tasks/workarounds.yaml | 1 - roles/ensure-terraform/tasks/main.yaml | 1 - roles/ensure-virtualenv/tasks/CentOS-7.yaml | 1 - roles/ensure-virtualenv/tasks/Gentoo.yaml | 1 - roles/golangci-lint/library/test-cases/single_line.yaml | 1 - roles/nimble/defaults/main.yaml | 1 - roles/tox/library/test-cases/pep8_output.yaml | 1 - roles/tox/library/test-cases/pep8_output_envlist.yaml | 1 - roles/tox/library/test-cases/sphinx_output.yaml | 1 - roles/upload-afs-synchronize/tasks/main.yaml | 1 - roles/validate-zone-db/defaults/main.yaml | 1 - test-playbooks/dstat-graph.yaml | 1 - test-playbooks/ensure-docker.yaml | 1 - test-playbooks/ensure-pip.yaml | 1 - test-playbooks/ensure-tox.yaml | 1 - 22 files changed, 24 deletions(-) diff --git a/.yamllint b/.yamllint index e31949dcc..c66d345ee 100644 --- a/.yamllint +++ b/.yamllint @@ -10,9 +10,6 @@ rules: max-spaces-inside: 1 level: error document-start: disable - empty-lines: - max: 1 - max-end: 2 indentation: level: error indent-sequences: consistent diff --git a/playbooks/terraform/pre.yaml b/playbooks/terraform/pre.yaml index 97620b4de..5710120f3 100644 --- a/playbooks/terraform/pre.yaml +++ b/playbooks/terraform/pre.yaml @@ -2,4 +2,3 @@ roles: - ensure-terraform - revoke-sudo - diff --git a/playbooks/terraform/run.yaml b/playbooks/terraform/run.yaml index 5719c84d2..a784ea02c 100644 --- a/playbooks/terraform/run.yaml +++ b/playbooks/terraform/run.yaml @@ -1,4 +1,3 @@ - hosts: all roles: - terraform - diff --git a/playbooks/tox-docs/pre.yaml b/playbooks/tox-docs/pre.yaml index 81975f024..693ef41e3 100644 --- a/playbooks/tox-docs/pre.yaml +++ b/playbooks/tox-docs/pre.yaml @@ -2,4 +2,3 @@ roles: - role: bindep bindep_dir: "{{ zuul_work_dir }}" - diff --git a/roles/build-docker-image/tasks/setup-buildx.yaml b/roles/build-docker-image/tasks/setup-buildx.yaml index e62020d92..afbb8a353 100644 --- a/roles/build-docker-image/tasks/setup-buildx.yaml +++ b/roles/build-docker-image/tasks/setup-buildx.yaml @@ -80,4 +80,3 @@ file: state: absent path: '{{ etc_hosts_tmp.path }}' - diff --git a/roles/ensure-go/tasks/install-go.yaml b/roles/ensure-go/tasks/install-go.yaml index 393bc9039..a70c5542d 100644 --- a/roles/ensure-go/tasks/install-go.yaml +++ b/roles/ensure-go/tasks/install-go.yaml @@ -21,4 +21,3 @@ dest: "{{ go_install_dir }}" remote_src: yes become: true - diff --git a/roles/ensure-packer/vars/main.yaml b/roles/ensure-packer/vars/main.yaml index 225b63183..8855aceed 100644 --- a/roles/ensure-packer/vars/main.yaml +++ b/roles/ensure-packer/vars/main.yaml @@ -4,4 +4,3 @@ packer_arch_translation: i386: 386 packer_version_pattern: ^Packer v(?P\d+\.\d+\.\d+).*$ - diff --git a/roles/ensure-pip/tasks/workarounds.yaml b/roles/ensure-pip/tasks/workarounds.yaml index 6b38c3e4a..5954ce4b7 100644 --- a/roles/ensure-pip/tasks/workarounds.yaml +++ b/roles/ensure-pip/tasks/workarounds.yaml @@ -43,4 +43,3 @@ when: - ansible_os_family == 'Debian' - _deb_venv_pkg.rc != 0 - diff --git a/roles/ensure-terraform/tasks/main.yaml b/roles/ensure-terraform/tasks/main.yaml index 8d79ad6aa..41e522342 100644 --- a/roles/ensure-terraform/tasks/main.yaml +++ b/roles/ensure-terraform/tasks/main.yaml @@ -9,4 +9,3 @@ - terraform_installed_version.rc != 0 or "terraform_version != (terraform_installed_version.msg | \ regex_replace(terraform_version_pattern, '\\g'))" - diff --git a/roles/ensure-virtualenv/tasks/CentOS-7.yaml b/roles/ensure-virtualenv/tasks/CentOS-7.yaml index 602c2ce25..9c36dcf32 100644 --- a/roles/ensure-virtualenv/tasks/CentOS-7.yaml +++ b/roles/ensure-virtualenv/tasks/CentOS-7.yaml @@ -3,4 +3,3 @@ name: - python-virtualenv become: yes - diff --git a/roles/ensure-virtualenv/tasks/Gentoo.yaml b/roles/ensure-virtualenv/tasks/Gentoo.yaml index 8ff8c8945..e1a719ace 100644 --- a/roles/ensure-virtualenv/tasks/Gentoo.yaml +++ b/roles/ensure-virtualenv/tasks/Gentoo.yaml @@ -2,4 +2,3 @@ package: name: dev-python/virtualenv become: yes - diff --git a/roles/golangci-lint/library/test-cases/single_line.yaml b/roles/golangci-lint/library/test-cases/single_line.yaml index 5d426d0d6..5da3751a7 100644 --- a/roles/golangci-lint/library/test-cases/single_line.yaml +++ b/roles/golangci-lint/library/test-cases/single_line.yaml @@ -25,4 +25,3 @@ comments: controllers/memcached_controller.go: - line: 130 message: "S1039: unnecessary use of fmt.Sprintf (gosimple)" - diff --git a/roles/nimble/defaults/main.yaml b/roles/nimble/defaults/main.yaml index c5c4da803..0aad90942 100644 --- a/roles/nimble/defaults/main.yaml +++ b/roles/nimble/defaults/main.yaml @@ -2,4 +2,3 @@ nimble_command: build nimble_use_siblings: true nimble_siblings: "{{ zuul.projects.values() | selectattr('required') | map(attribute='src_dir') | list }}" zuul_work_dir: "{{ zuul.project.src_dir }}" - diff --git a/roles/tox/library/test-cases/pep8_output.yaml b/roles/tox/library/test-cases/pep8_output.yaml index da9254277..d2cf10adc 100644 --- a/roles/tox/library/test-cases/pep8_output.yaml +++ b/roles/tox/library/test-cases/pep8_output.yaml @@ -23,4 +23,3 @@ comments: tests/test_discovery.py: - line: 219 message: E128 continuation line under-indented for visual indent - diff --git a/roles/tox/library/test-cases/pep8_output_envlist.yaml b/roles/tox/library/test-cases/pep8_output_envlist.yaml index d3ec3de65..f32725c95 100644 --- a/roles/tox/library/test-cases/pep8_output_envlist.yaml +++ b/roles/tox/library/test-cases/pep8_output_envlist.yaml @@ -24,4 +24,3 @@ comments: tests/test_discovery.py: - line: 219 message: "pep8: E128 continuation line under-indented for visual indent" - diff --git a/roles/tox/library/test-cases/sphinx_output.yaml b/roles/tox/library/test-cases/sphinx_output.yaml index 694177cd1..466ab335a 100644 --- a/roles/tox/library/test-cases/sphinx_output.yaml +++ b/roles/tox/library/test-cases/sphinx_output.yaml @@ -21,4 +21,3 @@ comments: CONTRIBUTING.rst: - line: 96 message: Unknown directive type "code-blockf". - diff --git a/roles/upload-afs-synchronize/tasks/main.yaml b/roles/upload-afs-synchronize/tasks/main.yaml index 6dfb49abd..4aae41900 100644 --- a/roles/upload-afs-synchronize/tasks/main.yaml +++ b/roles/upload-afs-synchronize/tasks/main.yaml @@ -16,4 +16,3 @@ times: true recursive: true rsync_opts: '{{ ["--safe-links"] + ["--delete-after"] if not afs_copy_only else [] }}' - diff --git a/roles/validate-zone-db/defaults/main.yaml b/roles/validate-zone-db/defaults/main.yaml index d019dbedf..def0180d2 100644 --- a/roles/validate-zone-db/defaults/main.yaml +++ b/roles/validate-zone-db/defaults/main.yaml @@ -1,3 +1,2 @@ zone_files: '{{ ansible_user_dir }}/{{ zuul.project.src_dir }}' zone_db_files: [] - diff --git a/test-playbooks/dstat-graph.yaml b/test-playbooks/dstat-graph.yaml index b38a3d810..1184987ce 100644 --- a/test-playbooks/dstat-graph.yaml +++ b/test-playbooks/dstat-graph.yaml @@ -19,4 +19,3 @@ - role: dstat-graph vars: dstat_graph_cache_ignore: true - diff --git a/test-playbooks/ensure-docker.yaml b/test-playbooks/ensure-docker.yaml index d43345716..2bb6679b2 100644 --- a/test-playbooks/ensure-docker.yaml +++ b/test-playbooks/ensure-docker.yaml @@ -16,4 +16,3 @@ - name: Validate docker default bridge networking containers have internet access command: | docker run --rm curlimages/curl:latest --no-progress-meter https://httpbin.org/get - diff --git a/test-playbooks/ensure-pip.yaml b/test-playbooks/ensure-pip.yaml index ad3aeadb6..75d0f170f 100644 --- a/test-playbooks/ensure-pip.yaml +++ b/test-playbooks/ensure-pip.yaml @@ -70,4 +70,3 @@ # - role: ensure-pip # vars: # ensure_pip_from_upstream: True - diff --git a/test-playbooks/ensure-tox.yaml b/test-playbooks/ensure-tox.yaml index d245112c3..5ea93d5c4 100644 --- a/test-playbooks/ensure-tox.yaml +++ b/test-playbooks/ensure-tox.yaml @@ -53,4 +53,3 @@ assert: that: - tox_executable == '{{ ansible_user_dir }}/tox-venv/bin/tox' -