From e1a2efcdca008a6fa026ab92bfa5fdc2ecd93508 Mon Sep 17 00:00:00 2001 From: leo-amd Date: Wed, 18 Mar 2026 16:24:32 +0100 Subject: [PATCH 1/3] Create a pre-commit workflow --- .github/workflows/pre-commit.yml | 16 ++++++++++++++++ .pre-commit-config.yaml | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 000000000..f6499ad40 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,16 @@ +name: pre-commit + +on: + push: + branches: [master, 'release/*'] + pull_request: + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 000000000..0112fe470 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +fail_fast: false +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 # Use the ref you want to point at + hooks: + - id: trailing-whitespace + - id: check-ast + - id: check-json + - id: check-merge-conflict + - id: check-toml + - id: check-yaml From e44d530a8a11fd54576fd3e4191a8a5aa4b61b23 Mon Sep 17 00:00:00 2001 From: Jithun Nair <37884920+jithunnair-amd@users.noreply.github.com> Date: Mon, 20 Apr 2026 10:23:33 -0500 Subject: [PATCH 2/3] Update .pre-commit-config.yaml --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0112fe470..c9bd525a8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,10 @@ +# Commands to run below checks locally: +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks trailing-whitespace --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-ast --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-json --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-merge-conflict --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-toml --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-yaml --all-files fail_fast: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks From 0c84906dfce8e593310a241a654d6b3be4e92506 Mon Sep 17 00:00:00 2001 From: Jithun Nair Date: Mon, 20 Apr 2026 15:32:43 +0000 Subject: [PATCH 3/3] Remove whitespaces --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c9bd525a8..b41a9f7be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,10 @@ # Commands to run below checks locally: -# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks trailing-whitespace --all-files -# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-ast --all-files -# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-json --all-files -# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-merge-conflict --all-files -# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-toml --all-files -# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-yaml --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks trailing-whitespace --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-ast --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-json --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-merge-conflict --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-toml --all-files +# pre-commit try-repo https://github.com/pre-commit/pre-commit-hooks check-yaml --all-files fail_fast: false repos: - repo: https://github.com/pre-commit/pre-commit-hooks