Perform GDScript format checks using pre-commit

This commit is contained in:
Leroy Hopson 2024-02-13 11:27:07 +13:00
parent dfc0969133
commit 9b6bb0a9e9
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
3 changed files with 8 additions and 10 deletions

View file

@ -302,15 +302,9 @@ jobs:
exit 1 exit 1
fi fi
check-code-format: check-pre-commit:
name: "Check Code Format" name: "Check Pre-Commit"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-python@v5 - uses: pre-commit/action@v3.0.1
with:
python-version: 3.9
- name: GDFormat Check
run: |
python -m pip install -r requirements.txt
gdformat -c .

View file

@ -13,3 +13,8 @@ repos:
rev: v3.1.0 rev: v3.1.0
hooks: hooks:
- id: prettier - id: prettier
- repo: https://github.com/Scony/godot-gdscript-toolkit
rev: 3.5.0
hooks:
- id: gdformat
exclude: "^addons/gut/"

View file

@ -1 +0,0 @@
gdtoolkit==3.5.0