diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml index 5142773519364e5eb9ad3061ca1f2abc00dd78bd..a91fd3042f1a22243117eaacb27dd876660007a1 100644 --- a/.github/workflows/validation.yml +++ b/.github/workflows/validation.yml @@ -19,6 +19,9 @@ jobs: run: | yamllint --format github --strict \ device-types/ module-types/ + - name: Format YAML files (hooks) + run: | + pre-commit run --config .pre-commit-hooks-config.yaml --all-files - name: Format YAML files (yamlfmt) run: | pre-commit run --config .pre-commit-yamlfmt-config.yaml --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 62a21519aaae6c55c196a8c38dd3b92a67dca99d..fb5ae7a9c6000e944d858accd48dc2d4fc5daa05 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,19 +2,19 @@ files: ^(device-types|module-types)/ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml name: Check YAML files - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt - rev: 0.2.2 + rev: 0.2.3 hooks: - id: yamlfmt args: [--mapping, '2', --sequence, '4', --offset, '2'] - repo: https://github.com/adrienverge/yamllint.git - rev: v1.27.1 + rev: v1.31.0 hooks: - id: yamllint name: Lint YAML files diff --git a/.pre-commit-hooks-config.yaml b/.pre-commit-hooks-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5c226991754ede8fa119d782172ebecb062dabd3 --- /dev/null +++ b/.pre-commit-hooks-config.yaml @@ -0,0 +1,10 @@ +--- +files: ^(device-types|module-types)/ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + name: Check YAML files \ No newline at end of file diff --git a/.pre-commit-yamlfmt-config.yaml b/.pre-commit-yamlfmt-config.yaml index 8441d44fccf01a11d6d86342986df4962b0a700d..c22135590555488889aab3cec1f41b75eae26b45 100644 --- a/.pre-commit-yamlfmt-config.yaml +++ b/.pre-commit-yamlfmt-config.yaml @@ -1,15 +1,8 @@ --- files: ^(device-types|module-types)/ repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 - hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - name: Check YAML files - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt - rev: 0.2.2 + rev: 0.2.3 hooks: - id: yamlfmt args: [--mapping, '2', --sequence, '4', --offset, '2'] diff --git a/requirements.txt b/requirements.txt index 2961087c108c28f5cc1479d2ce05ab8a44959118..214f3799cb9b43e9eb8a06bf2fc16b8b7b4ea5c5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ jsonschema==4.17.3 -pre-commit==3.2.1 -pytest==7.2.2 +pre-commit==3.2.2 +pytest==7.3.1 PyYAML==6.0 -yamllint==1.30.0 +yamllint==1.31.0