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 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__": diff --git a/.hooks/validate_godot_project.py b/.hooks/validate_godot_project.py index 55b7347..9e904d5 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 @@ -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..60a7fad 100644 --- a/src/addons/gut/gui/MinGui.tscn +++ b/src/addons/gut/gui/MinGui.tscn @@ -101,7 +101,6 @@ 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 diff --git a/src/addons/gut/gui/NormalGui.tscn b/src/addons/gut/gui/NormalGui.tscn index 6d6884e..1f36fac 100644 --- a/src/addons/gut/gui/NormalGui.tscn +++ b/src/addons/gut/gui/NormalGui.tscn @@ -135,7 +135,6 @@ size_flags_vertical = 3 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"] 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 = {