From d8bf215a8f2369c9cf33838b8c64bf29d558b05d Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sat, 23 Sep 2023 15:29:46 +0200 Subject: [PATCH] fix: file settings and check order --- .editorconfig | 3 +++ .pre-commit-config.yaml | 39 +++++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/.editorconfig b/.editorconfig index 2c16156..30d0679 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,8 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true +[*.xml] +indent_size = 2 + [*.{yaml,yml}] indent_size = 2 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fec1ee9..58daf94 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,30 +3,37 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: trailing-whitespace - args: - - --markdown-linebreak-ext=md # ignore markdown's line break - - id: end-of-file-fixer - - id: check-json - - id: check-yaml - args: [--allow-multiple-documents] - - id: check-xml - - id: check-added-large-files - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook rev: v9.5.0 hooks: - id: commitlint - stages: [commit-msg] - additional_dependencies: ['@commitlint/config-conventional'] + stages: + - commit-msg + additional_dependencies: + - '@commitlint/config-conventional' + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + - id: check-json + - id: check-xml + - id: check-yaml + args: + - --allow-multiple-documents + - id: trailing-whitespace + args: + - --markdown-linebreak-ext=md # ignore markdown's line break + - id: end-of-file-fixer - repo: https://github.com/markdownlint/markdownlint rev: v0.12.0 hooks: - id: markdownlint args: - -r "~MD013" # ignore line-length rule + - repo: https://github.com/hadolint/hadolint + rev: v2.12.1-beta + hooks: + - id: hadolint # - repo: https://github.com/ansible-community/ansible-lint # # FIXME: need to figure this out, too many stupid issues. # # Using `ansible-lint -v ansible` for the time being. @@ -35,7 +42,3 @@ repos: # - id: ansible-lint # exclude: .* # files: ansible/ - - repo: https://github.com/hadolint/hadolint - rev: v2.12.1-beta - hooks: - - id: hadolint