Merge "Add crate-ci/typos for typo correction"
This commit is contained in:
@@ -19,3 +19,21 @@
|
||||
loop: "{{ install_additional_projects }}"
|
||||
loop_control:
|
||||
loop_var: zj_dep
|
||||
|
||||
- name: Download crate-ci/typos
|
||||
ansible.builtin.get_url:
|
||||
url: "https://github.com/crate-ci/typos/releases/download/v1.23.6/typos-v1.23.6-x86_64-unknown-linux-musl.tar.gz"
|
||||
dest: "/tmp/typos.tar.gz"
|
||||
|
||||
- name: Create bin folder
|
||||
ansible.builtin.file:
|
||||
path: "{{ ansible_user_dir }}/bin"
|
||||
state: "directory"
|
||||
mode: "0755"
|
||||
|
||||
- name: Unpack typos
|
||||
ansible.builtin.unarchive:
|
||||
src: "/tmp/typos.tar.gz"
|
||||
dest: "{{ ansible_user_dir }}/bin"
|
||||
creates: "{{ ansible_user_dir }}/bin/typos"
|
||||
remote_src: true
|
||||
|
||||
@@ -20,3 +20,6 @@
|
||||
{%- if codegenerator_api_ref is defined and codegenerator_api_ref is mapping %}
|
||||
--api-ref-src {{ ansible_user_dir }}/{{ zuul.projects[codegenerator_api_ref.project].src_dir }}/{{ codegenerator_api_ref.path | default("/api-ref/build/html/index.html") }}
|
||||
{% endif %}
|
||||
|
||||
- name: "Fix typos"
|
||||
ansible.builtin.command: "{{ ansible_user_dir }}/bin/typos -vw {{ ansible_user_dir }}/{{ codegenerator_work_dir }}/openapi_specs"
|
||||
|
||||
Reference in New Issue
Block a user