From dd2e71a91ac052345099fbd8ce8c250ac52c6041 Mon Sep 17 00:00:00 2001 From: Zephilinox Date: Fri, 29 Aug 2025 14:24:55 +0100 Subject: [PATCH 1/6] More CI checks --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4695e7d..f131fc6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -51,7 +51,7 @@ jobs: git diff - name: unit tests with godot gut - uses: 100-Devs-1-Game/godot-gut-ci@feature/better-ci-errors + uses: 100-Devs-1-Game/godot-gut-ci@feature/more-better-ci-errors with: godot_version: ${{ env.GODOT_VERSION }} gut_params: -gdir=res://tests/unit From 0b57841ac36d86dc136e03f65c7cbf22c9694242 Mon Sep 17 00:00:00 2001 From: Zephilinox Date: Fri, 29 Aug 2025 14:40:55 +0100 Subject: [PATCH 2/6] Validate our addons --- .hooks/validate_godot_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.hooks/validate_godot_project.py b/.hooks/validate_godot_project.py index 55b7347..1331cd2 100755 --- a/.hooks/validate_godot_project.py +++ b/.hooks/validate_godot_project.py @@ -29,7 +29,7 @@ def __init__(self, project_root: str, excluded_dirs: Set[str] = None): self.duplicate_uids: Dict[str, List[str]] = defaultdict(list) self.errors: List[str] = [] self.warnings: List[str] = [] - self.excluded_dirs = excluded_dirs or {'addons', 'builds', '.godot', '.git', 'node_modules', '__pycache__', '.venv'} + self.excluded_dirs = excluded_dirs or {'.github', '.hooks', 'builds', '.godot', '.git', 'node_modules', '__pycache__', '.venv'} # Regex patterns # UID definition in .tscn From b88e4b3dcef1c5392ebf80f2cccc26a1b2305c10 Mon Sep 17 00:00:00 2001 From: Zephilinox Date: Fri, 29 Aug 2025 14:52:25 +0100 Subject: [PATCH 3/6] Fix addons, ish. bit hacky, but some validation errors are a problem and others are not :/ --- .hooks/validate_godot_project.py | 20 ++++++++++++++----- src/addons/gut/gui/MinGui.tscn | 7 ------- src/addons/gut/gui/NormalGui.tscn | 7 ------- src/addons/gut/gut_loader_the_scene.tscn | 7 ------- src/addons/phantom_camera/panel/editor.gd.uid | 1 - .../script-ide/override/override_panel.tscn | 2 +- .../quickopen/quick_open_panel.tscn | 2 +- 7 files changed, 17 insertions(+), 29 deletions(-) delete mode 100644 src/addons/gut/gut_loader_the_scene.tscn delete mode 100644 src/addons/phantom_camera/panel/editor.gd.uid diff --git a/.hooks/validate_godot_project.py b/.hooks/validate_godot_project.py index 1331cd2..d1d89a5 100755 --- a/.hooks/validate_godot_project.py +++ b/.hooks/validate_godot_project.py @@ -281,11 +281,21 @@ def _validate_res_paths(self, file_path: Path, content: str): # Convert res:// path to actual file path actual_path = self.project_root / res_path[6:] # Remove "res://" - if not actual_path.exists(): - self.errors.append( - f"{file_path.relative_to(self.project_root).as_posix()}: " - f"The file '{res_path}' does not exist" - ) + if actual_path.exists(): + continue + + lines = content.splitlines() + start_idx = match.start() + line_num = content.count("\n", 0, start_idx) + line = lines[line_num].strip() + + if "FileAccess.file_exists" in line or "DirAccess.dir_exists" in line or line.startswith("#"): + continue + + self.errors.append( + f"{file_path.relative_to(self.project_root).as_posix()}: " + f"The file '{res_path}' does not exist" + ) def _validate_uid_paths(self, file_path: Path, content: str): """Validate all uid:// paths in a file.""" diff --git a/src/addons/gut/gui/MinGui.tscn b/src/addons/gut/gui/MinGui.tscn index 8ae6ba4..54f0d66 100644 --- a/src/addons/gut/gui/MinGui.tscn +++ b/src/addons/gut/gui/MinGui.tscn @@ -98,13 +98,6 @@ clip_contents = true layout_mode = 2 size_flags_vertical = 3 -[node name="Path" type="Label" parent="MainBox/Body/BodyRows/PathDisplay"] -layout_mode = 2 -theme_override_font_sizes/font_size = 14 -text = "res://test/integration/whatever" -clip_text = true -text_overrun_behavior = 3 - [node name="HBoxContainer" type="HBoxContainer" parent="MainBox/Body/BodyRows/PathDisplay"] clip_contents = true layout_mode = 2 diff --git a/src/addons/gut/gui/NormalGui.tscn b/src/addons/gut/gui/NormalGui.tscn index 6d6884e..cc67d40 100644 --- a/src/addons/gut/gui/NormalGui.tscn +++ b/src/addons/gut/gui/NormalGui.tscn @@ -131,13 +131,6 @@ layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="Path" type="Label" parent="MainBox/HBoxContainer/VBoxContainer/ControlBox/PathDisplay"] -layout_mode = 2 -size_flags_vertical = 6 -theme_override_font_sizes/font_size = 14 -text = "res://test/integration/whatever" -text_overrun_behavior = 3 - [node name="HBoxContainer" type="HBoxContainer" parent="MainBox/HBoxContainer/VBoxContainer/ControlBox/PathDisplay"] layout_mode = 2 size_flags_vertical = 3 diff --git a/src/addons/gut/gut_loader_the_scene.tscn b/src/addons/gut/gut_loader_the_scene.tscn deleted file mode 100644 index 8fbd010..0000000 --- a/src/addons/gut/gut_loader_the_scene.tscn +++ /dev/null @@ -1,7 +0,0 @@ -[gd_scene load_steps=2 format=3 uid="uid://jt6wsefn0x54"] - -[sub_resource type="Resource" id="Resource_cayac"] -metadata/__load_path__ = "res://addons/gut/gut_loader_the_scene.gd" - -[node name="Node" type="Node2D"] -script = SubResource("Resource_cayac") diff --git a/src/addons/phantom_camera/panel/editor.gd.uid b/src/addons/phantom_camera/panel/editor.gd.uid deleted file mode 100644 index 52a27c4..0000000 --- a/src/addons/phantom_camera/panel/editor.gd.uid +++ /dev/null @@ -1 +0,0 @@ -uid://ppret7j0jle7 diff --git a/src/addons/script-ide/override/override_panel.tscn b/src/addons/script-ide/override/override_panel.tscn index 791c8d9..627fef7 100644 --- a/src/addons/script-ide/override/override_panel.tscn +++ b/src/addons/script-ide/override/override_panel.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=2 format=3 uid="uid://bb1n82qxlqanh"] -[ext_resource type="Script" uid="uid://chc6jwpxj1ig8" path="res://addons/script-ide/override/override_panel.gd" id="1_c3eqr"] +[ext_resource type="Script" uid="uid://dlusv4e8xot7v" path="res://addons/script-ide/override/override_panel.gd" id="1_c3eqr"] [node name="OverridePanel" type="PopupPanel"] size = Vector2i(551, 194) diff --git a/src/addons/script-ide/quickopen/quick_open_panel.tscn b/src/addons/script-ide/quickopen/quick_open_panel.tscn index 8d3d8b8..ad80cb4 100644 --- a/src/addons/script-ide/quickopen/quick_open_panel.tscn +++ b/src/addons/script-ide/quickopen/quick_open_panel.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=14 format=3 uid="uid://d2pttchmj3n7q"] -[ext_resource type="Script" uid="uid://deyc8ora1jlkr" path="res://addons/script-ide/quickopen/quick_open_panel.gd" id="1_3tl1s"] +[ext_resource type="Script" uid="uid://bvlg8cbnksi3m" path="res://addons/script-ide/quickopen/quick_open_panel.gd" id="1_3tl1s"] [sub_resource type="Image" id="Image_ta8yk"] data = { From 9901ab39b01bf68c6bf08d359d87ddcb5079676b Mon Sep 17 00:00:00 2001 From: Zephilinox Date: Fri, 29 Aug 2025 14:58:18 +0100 Subject: [PATCH 4/6] Fix precommit --- .hooks/validate_godot_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.hooks/validate_godot_project.py b/.hooks/validate_godot_project.py index d1d89a5..9e904d5 100755 --- a/.hooks/validate_godot_project.py +++ b/.hooks/validate_godot_project.py @@ -283,7 +283,7 @@ def _validate_res_paths(self, file_path: Path, content: str): if actual_path.exists(): continue - + lines = content.splitlines() start_idx = match.start() line_num = content.count("\n", 0, start_idx) From 1cf5640c4416ea22742994a1de114bbe74447070 Mon Sep 17 00:00:00 2001 From: Zephilinox Date: Fri, 29 Aug 2025 14:59:19 +0100 Subject: [PATCH 5/6] Remove link to doc that doesn't exist and no one used anyway --- .hooks/helpful_hints.py | 1 - 1 file changed, 1 deletion(-) diff --git a/.hooks/helpful_hints.py b/.hooks/helpful_hints.py index 9ccc8ef..03ebbee 100755 --- a/.hooks/helpful_hints.py +++ b/.hooks/helpful_hints.py @@ -7,7 +7,6 @@ def main(): print("If you get any linting errors, please look at the `gdlintrc` file for the rules to follow.") - print("See also https://github.com/100-Devs-1-Game/All-the-Incrementals/blob/main/docs/github_actions.md#my-github-actions-failed-and-i-dont-know-what-to-do-pls-help") return 0 if __name__ == "__main__": From 9876de18f6da553c976a38fbe1954b5e8a2cfa60 Mon Sep 17 00:00:00 2001 From: Zephilinox Date: Fri, 29 Aug 2025 15:03:39 +0100 Subject: [PATCH 6/6] Fix GUT from myself --- src/addons/gut/gui/MinGui.tscn | 6 ++++++ src/addons/gut/gui/NormalGui.tscn | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/addons/gut/gui/MinGui.tscn b/src/addons/gut/gui/MinGui.tscn index 54f0d66..60a7fad 100644 --- a/src/addons/gut/gui/MinGui.tscn +++ b/src/addons/gut/gui/MinGui.tscn @@ -98,6 +98,12 @@ clip_contents = true layout_mode = 2 size_flags_vertical = 3 +[node name="Path" type="Label" parent="MainBox/Body/BodyRows/PathDisplay"] +layout_mode = 2 +theme_override_font_sizes/font_size = 14 +clip_text = true +text_overrun_behavior = 3 + [node name="HBoxContainer" type="HBoxContainer" parent="MainBox/Body/BodyRows/PathDisplay"] clip_contents = true layout_mode = 2 diff --git a/src/addons/gut/gui/NormalGui.tscn b/src/addons/gut/gui/NormalGui.tscn index cc67d40..1f36fac 100644 --- a/src/addons/gut/gui/NormalGui.tscn +++ b/src/addons/gut/gui/NormalGui.tscn @@ -131,6 +131,12 @@ layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 +[node name="Path" type="Label" parent="MainBox/HBoxContainer/VBoxContainer/ControlBox/PathDisplay"] +layout_mode = 2 +size_flags_vertical = 6 +theme_override_font_sizes/font_size = 14 +text_overrun_behavior = 3 + [node name="HBoxContainer" type="HBoxContainer" parent="MainBox/HBoxContainer/VBoxContainer/ControlBox/PathDisplay"] layout_mode = 2 size_flags_vertical = 3