From 65d4ea18ea50b3e95d749d325fc218c71b5999ad Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Tue, 2 Nov 2021 13:05:03 -0700 Subject: [PATCH 1/6] Add pre-commit configuration --- .dictionary.txt | 4 ++++ .pre-commit-config.yaml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .dictionary.txt create mode 100644 .pre-commit-config.yaml diff --git a/.dictionary.txt b/.dictionary.txt new file mode 100644 index 0000000000..32171aae5c --- /dev/null +++ b/.dictionary.txt @@ -0,0 +1,4 @@ +ists +commitish +atleast +alpha-numeric diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..a887dd1d4d --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,33 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +exclude: docs/_vendor/ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.1.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + args: [--allow-multiple-documents] + - id: check-ast + - id: check-added-large-files + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: mixed-line-ending + - repo: https://github.com/golangci/golangci-lint + rev: v1.45.2 + hooks: + - id: golangci-lint + - repo: https://github.com/codespell-project/codespell + rev: v2.1.0 + hooks: + - id: codespell + args: [--ignore-words=.dictionary.txt] + - repo: https://github.com/asottile/pyupgrade + rev: v2.31.1 + hooks: + - id: pyupgrade + - repo: https://github.com/PyCQA/isort + rev: 5.10.1 + hooks: + - id: isort From 331211ef89580bebdedf527698673fb8a4b9a7b9 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Fri, 22 Apr 2022 18:47:43 +0200 Subject: [PATCH 2/6] update --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a887dd1d4d..d0e487a87f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: docs/_vendor/ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.1.0 + rev: v4.2.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -24,7 +24,7 @@ repos: - id: codespell args: [--ignore-words=.dictionary.txt] - repo: https://github.com/asottile/pyupgrade - rev: v2.31.1 + rev: v2.32.0 hooks: - id: pyupgrade - repo: https://github.com/PyCQA/isort From f34d727acd2576febe5bb04bbc059eb196a8b4eb Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 2 Nov 2022 19:50:01 -0700 Subject: [PATCH 3/6] updates --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d0e487a87f..58fe5845f9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: docs/_vendor/ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v4.3.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -15,16 +15,16 @@ repos: - id: check-shebang-scripts-are-executable - id: mixed-line-ending - repo: https://github.com/golangci/golangci-lint - rev: v1.45.2 + rev: v1.50.1 hooks: - id: golangci-lint - repo: https://github.com/codespell-project/codespell - rev: v2.1.0 + rev: v2.2.2 hooks: - id: codespell args: [--ignore-words=.dictionary.txt] - repo: https://github.com/asottile/pyupgrade - rev: v2.32.0 + rev: v3.2.0 hooks: - id: pyupgrade - repo: https://github.com/PyCQA/isort From 9e81403a5c3aaa011cfdaa9153cd99a2a8123e39 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 2 Nov 2022 19:52:49 -0700 Subject: [PATCH 4/6] Remove codespell --- .dictionary.txt | 4 ---- .pre-commit-config.yaml | 9 ++++----- 2 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 .dictionary.txt diff --git a/.dictionary.txt b/.dictionary.txt deleted file mode 100644 index 32171aae5c..0000000000 --- a/.dictionary.txt +++ /dev/null @@ -1,4 +0,0 @@ -ists -commitish -atleast -alpha-numeric diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 58fe5845f9..06ce001b99 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,11 +18,6 @@ repos: rev: v1.50.1 hooks: - id: golangci-lint - - repo: https://github.com/codespell-project/codespell - rev: v2.2.2 - hooks: - - id: codespell - args: [--ignore-words=.dictionary.txt] - repo: https://github.com/asottile/pyupgrade rev: v3.2.0 hooks: @@ -31,3 +26,7 @@ repos: rev: 5.10.1 hooks: - id: isort + - repo: https://github.com/psf/black + rev: 22.10.0 + hooks: + - id: black From 535a2893735319aaaa6ea6d0292cef9ac79f695f Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 2 Nov 2022 20:23:30 -0700 Subject: [PATCH 5/6] add more hooks --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 06ce001b99..566909a055 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,6 +14,11 @@ repos: - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: mixed-line-ending + args: [--fix=lf] + - id: name-tests-test + - id: no-commit-to-branch + - id: requirements-txt-fixer + - id: fix-byte-order-marker - repo: https://github.com/golangci/golangci-lint rev: v1.50.1 hooks: From 99ba1f08018425953f9f82e0a2657233c4c399fe Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Wed, 2 Nov 2022 20:47:13 -0700 Subject: [PATCH 6/6] add schema check --- .pre-commit-config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 566909a055..48a65687c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,3 +35,11 @@ repos: rev: 22.10.0 hooks: - id: black + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.18.4 + hooks: + - id: check-jsonschema + name: "Check Helm Chart JSON Schema" + files: deployments/helm-chart/values.yaml + types: [yaml] + args: ['--schemafile', 'deployments/helm-chart/values.schema.json']