From 4fb7266c21c321b10497c44a83042bbbc0a0c685 Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Wed, 21 Jun 2023 17:14:44 +0200 Subject: [PATCH] Use yamlling --- README.md | 2 +- roles/dotfiles/files/vimrc | 1 + roles/dotfiles/files/yamllint_config | 10 ++++++++++ roles/dotfiles/tasks/main.yml | 29 +++++----------------------- 4 files changed, 17 insertions(+), 25 deletions(-) create mode 100644 roles/dotfiles/files/yamllint_config diff --git a/README.md b/README.md index 46e83c3..022709f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ Ansible must be installed. Invoke with -`ansible-playbook -i hosts.ini dotfiles.yml -K` +`ansible-playbook -i hosts.yaml dotfiles.yml -K` diff --git a/roles/dotfiles/files/vimrc b/roles/dotfiles/files/vimrc index 524ccb0..98f08d0 100644 --- a/roles/dotfiles/files/vimrc +++ b/roles/dotfiles/files/vimrc @@ -92,6 +92,7 @@ let g:ale_linters = {'python': ['flake8', 'mypy'],} let g:ale_fixers = {'python': ['black', 'isort']} let g:ale_python_pylint_options = '--disable=C0111' let g:ale_python_mypy_options = '--ignore-missing-imports --disallow-untyped-defs --disallow-incomplete-defs' +let g:ale_python_flake8_options = '--max-line-length=88 --ignore=E501,W503' " Black let g:black_linelength = 88 diff --git a/roles/dotfiles/files/yamllint_config b/roles/dotfiles/files/yamllint_config new file mode 100644 index 0000000..6a81e93 --- /dev/null +++ b/roles/dotfiles/files/yamllint_config @@ -0,0 +1,10 @@ +extends: relaxed + +rules: + line-length: disable + braces: + level: warning + max-spaces-inside: 1 + brackets: + level: warning + max-spaces-inside: 1 diff --git a/roles/dotfiles/tasks/main.yml b/roles/dotfiles/tasks/main.yml index 49428c7..138ea69 100644 --- a/roles/dotfiles/tasks/main.yml +++ b/roles/dotfiles/tasks/main.yml @@ -46,6 +46,7 @@ - vim-nox - wdisplays - wl-clipboard + - yamllint state: present cache_valid_time: 3600 @@ -79,6 +80,7 @@ - '{{ home }}/.config/rofi/config.rasi' - '{{ home }}/.config/kanshi/config' - '{{ home }}/.config/foot/foot.ini' + - '{{ home }}/.config/yamllint/config' - '{{ home }}/.gitconfig' - '{{ home }}/.gnupg/gpg-agent.conf' - '{{ home }}/.sway/config' @@ -99,6 +101,7 @@ - '{{ home }}/pictures/shots/' - '{{ home }}/.gnupg/' - '{{ home }}/.sway/' + - '{{ home }}/.config/yamllint/' - '{{ home }}/bin/' - '{{ home }}/.local/share/systemd/user' @@ -137,27 +140,5 @@ dest: '{{ home }}/.config/foot/foot.ini' - src: '{{ files_dir }}/bin/git-sync' dest: '{{ home }}/bin/git-sync' - -- name: Create note sync service - ansible.builtin.template: - src: 'templates/systemd/note-sync/note-sync.service.j2' - dest: '{{ home }}/.local/share/systemd/user/note-sync.service' - mode: '644' - -- name: Create note sync timer - ansible.builtin.template: - src: 'templates/systemd/note-sync/note-sync.timer.j2' - dest: '{{ home }}/.local/share/systemd/user/note-sync.timer' - mode: '644' - -- name: Reload systemd - ansible.builtin.systemd: - scope: user - daemon_reload: true - -- name: Enable note sync timer - ansible.builtin.systemd: - name: note-sync.timer - scope: user - state: started - enabled: true + - src: '{{ files_dir }}/yamllint_config' + dest: '{{ home }}/.config/yamllint/config'