From 501bbda82bb8a11ef67c9639dd162c7cb7567328 Mon Sep 17 00:00:00 2001 From: Thomas Braun Date: Mon, 18 Nov 2024 15:18:13 +0100 Subject: [PATCH] CI: Rework ipt format check We now name that step "IPT checks" as we also do linting. And this means we should also rename tools/ipt-format.sh. --- .github/workflows/build-pr.yml | 6 +++--- tools/{ipt-format.sh => run-ipt.sh} | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) rename tools/{ipt-format.sh => run-ipt.sh} (82%) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index ab34e5ddd1..54df7dedc3 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -39,7 +39,7 @@ concurrency: jobs: Ipt: - name: 🔎 IPT Format check + name: 🔎 IPT checks runs-on: [ self-hosted, Windows ] steps: - name: Checkout repository @@ -49,8 +49,8 @@ jobs: run: curl -o ipt.exe "https://byte-physics.de/public-downloads/aistorage/transfer/ipt/0.6.0/ipt.exe" - name: IPT version run: ./ipt.exe --version - - name: Format code - run: tools/ipt-format.sh + - name: Format and lint code + run: tools/run-ipt.sh - name: Check for changed files run: git diff --name-only --ignore-submodules; git diff --ignore-submodules --quiet - name: Create patch diff --git a/tools/ipt-format.sh b/tools/run-ipt.sh similarity index 82% rename from tools/ipt-format.sh rename to tools/run-ipt.sh index d36fe69cd8..5eaf55bc64 100755 --- a/tools/ipt-format.sh +++ b/tools/run-ipt.sh @@ -23,9 +23,8 @@ else ipt="ipt" fi -echo "[format]" > config.toml +echo "[lint]" > config.toml while read -r line; do echo "files = \"$line\"" >> config.toml done < <(git ls-files ':(attr:ipt)') - -(cd $top_level && $ipt --arg-file config.toml format -i) +(cd $top_level && $ipt --arg-file config.toml lint -i)