mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-22 01:30:25 +01:00
Perform GDScript format checks using pre-commit
This commit is contained in:
parent
8f08945df2
commit
aa2b93248e
4 changed files with 21 additions and 21 deletions
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
|
@ -320,16 +320,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
|
|
||||||
cache: "pip"
|
|
||||||
- name: Install python dependencies
|
|
||||||
run: pip install -r requirements.txt
|
|
||||||
- name: GDScript format check
|
|
||||||
run: gdformat -c .
|
|
||||||
|
|
|
@ -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: 4.2.2
|
||||||
|
hooks:
|
||||||
|
- id: gdformat
|
||||||
|
exclude: "^addons/gut/"
|
||||||
|
|
|
@ -243,7 +243,10 @@ func _handle_selection(event: InputEventMouse):
|
||||||
|
|
||||||
|
|
||||||
func _on_selection_held() -> void:
|
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:
|
if copy_on_selection:
|
||||||
var selection = _native_terminal.copy_selection()
|
var selection = _native_terminal.copy_selection()
|
||||||
# TODO:godot4
|
# TODO:godot4
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
gdtoolkit==4.2.2
|
|
Loading…
Reference in a new issue