Perform GDScript format checks using pre-commit

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

View file

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

View file

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

View file

@ -243,7 +243,10 @@ func _handle_selection(event: InputEventMouse):
func _on_selection_held() -> void:
if not Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT) or _selecting_mode == SelectionMode.NONE:
if (
not Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT)
or _selecting_mode == SelectionMode.NONE
):
if copy_on_selection:
var selection = _native_terminal.copy_selection()
# TODO:godot4

View file

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