gdharness 1.3.41 → 1.3.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +131 -47
- package/build/godot/addons/auto_reload/auto_reload.gd +18 -19
- package/build/godot/addons/gdharness_editor/animation_reads.gd +84 -35
- package/build/godot/addons/gdharness_editor/bridge_client.gd +53 -58
- package/build/godot/addons/gdharness_editor/declared_values.gd +68 -32
- package/build/godot/addons/gdharness_editor/file_reads.gd +114 -39
- package/build/godot/addons/gdharness_editor/file_walk.gd +12 -5
- package/build/godot/addons/gdharness_editor/headless_check.gd +94 -41
- package/build/godot/addons/gdharness_editor/plugin.gd +2 -3
- package/build/godot/addons/gdharness_editor/property_paths.gd +22 -12
- package/build/godot/addons/gdharness_editor/property_values.gd +143 -78
- package/build/godot/addons/gdharness_editor/reading.gd +37 -12
- package/build/godot/addons/gdharness_editor/same_values.gd +4 -4
- package/build/godot/addons/gdharness_editor/scene_file.gd +136 -79
- package/build/godot/addons/gdharness_editor/scene_uids.gd +12 -6
- package/build/godot/addons/gdharness_editor/serialisation.gd +75 -51
- package/build/godot/addons/gdharness_editor/setting_reads.gd +7 -6
- package/build/godot/addons/gdharness_editor/tool_executor.gd +3 -6
- package/build/godot/addons/gdharness_editor/tools/animation_states.gd +41 -28
- package/build/godot/addons/gdharness_editor/tools/animation_tools.gd +84 -50
- package/build/godot/addons/gdharness_editor/tools/animation_tracks.gd +70 -40
- package/build/godot/addons/gdharness_editor/tools/class_tools.gd +34 -30
- package/build/godot/addons/gdharness_editor/tools/filesystem_tools.gd +24 -22
- package/build/godot/addons/gdharness_editor/tools/navigation_bake.gd +49 -29
- package/build/godot/addons/gdharness_editor/tools/play_tools.gd +26 -21
- package/build/godot/addons/gdharness_editor/tools/profile_tools.gd +40 -40
- package/build/godot/addons/gdharness_editor/tools/resource_tools.gd +181 -107
- package/build/godot/addons/gdharness_editor/tools/scene_groups.gd +16 -9
- package/build/godot/addons/gdharness_editor/tools/scene_kin.gd +75 -43
- package/build/godot/addons/gdharness_editor/tools/scene_paths.gd +35 -20
- package/build/godot/addons/gdharness_editor/tools/scene_placing.gd +28 -13
- package/build/godot/addons/gdharness_editor/tools/scene_sharing.gd +66 -0
- package/build/godot/addons/gdharness_editor/tools/scene_sharing.gd.uid +1 -0
- package/build/godot/addons/gdharness_editor/tools/scene_tools.gd +171 -62
- package/build/godot/addons/gdharness_editor/tools/script_paths.gd +20 -8
- package/build/godot/addons/gdharness_editor/tools/settings_tools.gd +11 -8
- package/build/godot/addons/gdharness_editor/tools/signal_tools.gd +47 -34
- package/build/godot/addons/gdharness_editor/tools/tileset_tools.gd +77 -50
- package/build/godot/addons/gdharness_editor/value_shapes.gd +5 -6
- package/build/godot/addons/gdharness_runtime/call_errors.gd +1 -2
- package/build/godot/addons/gdharness_runtime/declared_values.gd +68 -32
- package/build/godot/addons/gdharness_runtime/error_report.gd +1 -2
- package/build/godot/addons/gdharness_runtime/reading.gd +37 -12
- package/build/godot/addons/gdharness_runtime/runtime_accessibility.gd +84 -63
- package/build/godot/addons/gdharness_runtime/runtime_autoload.gd +153 -148
- package/build/godot/addons/gdharness_runtime/runtime_capture.gd +64 -42
- package/build/godot/addons/gdharness_runtime/runtime_changes.gd +184 -122
- package/build/godot/addons/gdharness_runtime/runtime_frames.gd +2 -2
- package/build/godot/addons/gdharness_runtime/runtime_hover.gd +24 -20
- package/build/godot/addons/gdharness_runtime/runtime_input.gd +134 -92
- package/build/godot/addons/gdharness_runtime/runtime_items.gd +29 -13
- package/build/godot/addons/gdharness_runtime/runtime_menus.gd +0 -1
- package/build/godot/addons/gdharness_runtime/runtime_mouse.gd +38 -20
- package/build/godot/addons/gdharness_runtime/runtime_pad.gd +17 -13
- package/build/godot/addons/gdharness_runtime/runtime_paths.gd +84 -46
- package/build/godot/addons/gdharness_runtime/runtime_queries.gd +117 -79
- package/build/godot/addons/gdharness_runtime/runtime_says.gd +14 -17
- package/build/godot/addons/gdharness_runtime/runtime_screen.gd +23 -16
- package/build/godot/addons/gdharness_runtime/runtime_targets.gd +117 -66
- package/build/godot/addons/gdharness_runtime/runtime_touch.gd +211 -0
- package/build/godot/addons/gdharness_runtime/runtime_touch.gd.uid +1 -0
- package/build/godot/addons/gdharness_runtime/runtime_typing.gd +44 -27
- package/build/godot/addons/gdharness_runtime/runtime_values.gd +108 -73
- package/build/godot/addons/gdharness_runtime/runtime_waits.gd +111 -84
- package/build/godot/addons/gdharness_runtime/runtime_words.gd +10 -7
- package/build/godot/addons/gdharness_runtime/serialisation.gd +75 -51
- package/build/godot/addons/gdharness_runtime/value_shapes.gd +5 -6
- package/build/godot/addons/gdharness_tests/bench.gd +4 -5
- package/build/godot/addons/gdharness_tests/event.gd +10 -5
- package/build/godot/addons/gdharness_tests/share.gd +38 -18
- package/build/godot/addons/gdharness_tests/suites.gd +3 -3
- package/build/godot/addons/gdharness_tests/wait.gd +3 -2
- package/build/godot/loader/loader.gd +9 -9
- package/build/godot/operations/animation_reads.gd +84 -35
- package/build/godot/operations/audio_buses.gd +48 -19
- package/build/godot/operations/class_cache.gd +16 -11
- package/build/godot/operations/classdb_queries.gd +89 -44
- package/build/godot/operations/declared_values.gd +68 -32
- package/build/godot/operations/dependencies.gd +139 -93
- package/build/godot/operations/editor_tools.gd +9 -10
- package/build/godot/operations/export_presets.gd +100 -54
- package/build/godot/operations/file_reads.gd +114 -39
- package/build/godot/operations/file_walk.gd +12 -5
- package/build/godot/operations/gdscript_analysis.gd +105 -66
- package/build/godot/operations/gdscript_authoring.gd +138 -39
- package/build/godot/operations/godot_operations.gd +17 -11
- package/build/godot/operations/import_pipeline.gd +110 -59
- package/build/godot/operations/input_actions.gd +63 -39
- package/build/godot/operations/patterns.gd +3 -1
- package/build/godot/operations/plugins.gd +36 -16
- package/build/godot/operations/project_config.gd +144 -27
- package/build/godot/operations/project_diagnostics.gd +24 -11
- package/build/godot/operations/project_file.gd +16 -16
- package/build/godot/operations/project_validation.gd +71 -44
- package/build/godot/operations/property_paths.gd +22 -12
- package/build/godot/operations/property_values.gd +143 -78
- package/build/godot/operations/reading.gd +37 -12
- package/build/godot/operations/rename_checks.gd +2 -2
- package/build/godot/operations/resource_files.gd +11 -9
- package/build/godot/operations/same_values.gd +4 -4
- package/build/godot/operations/scene_connections.gd +27 -13
- package/build/godot/operations/script_check.gd +52 -49
- package/build/godot/operations/serialisation.gd +75 -51
- package/build/godot/operations/setting_reads.gd +7 -6
- package/build/godot/operations/value_shapes.gd +5 -6
- package/build/godot/tests/listed.gd +321 -268
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
extends RefCounted
|
|
2
|
-
|
|
3
2
|
## Whether a project is ready to run and export: its settings, main scene, imports, presets,
|
|
4
3
|
## scripts, references and signal connections, each named under checks_performed.
|
|
5
4
|
|
|
@@ -13,7 +12,8 @@ const GdhRead = preload("reading.gd")
|
|
|
13
12
|
const GdhSceneConnections = preload("scene_connections.gd")
|
|
14
13
|
const GdhScriptCheck = preload("script_check.gd")
|
|
15
14
|
const CONNECTION_FIX: String = (
|
|
16
|
-
"Write the method or signal, or point the connection at the one that replaced it with"
|
|
15
|
+
"Write the method or signal, or point the connection at the one that replaced it with"
|
|
16
|
+
+ " scene_signal"
|
|
17
17
|
)
|
|
18
18
|
|
|
19
19
|
var _log: GdhLog
|
|
@@ -28,7 +28,9 @@ func validate_project(params: Dictionary) -> Dictionary:
|
|
|
28
28
|
var preset_name: String = str(params.get("preset", ""))
|
|
29
29
|
var include_suggestions: bool = GdhRead.as_bool(params.get("include_suggestions", true), true)
|
|
30
30
|
|
|
31
|
-
_log.info(
|
|
31
|
+
_log.info(
|
|
32
|
+
"Validating project" + (" for preset: " + preset_name if not preset_name.is_empty() else "")
|
|
33
|
+
)
|
|
32
34
|
|
|
33
35
|
var issues: Array[Dictionary] = []
|
|
34
36
|
var warnings: Array[Dictionary] = []
|
|
@@ -73,18 +75,24 @@ func validate_project(params: Dictionary) -> Dictionary:
|
|
|
73
75
|
# a scene using one fails to load in a run or an export.
|
|
74
76
|
checks_performed.append("imports")
|
|
75
77
|
var never: Array[String] = []
|
|
76
|
-
for path: String in _files.find_files_with_extensions(
|
|
78
|
+
for path: String in _files.find_files_with_extensions(
|
|
79
|
+
"res://", GdhImportPipeline.IMPORTABLE_EXTENSIONS
|
|
80
|
+
):
|
|
77
81
|
if not FileAccess.file_exists(path + ".import"):
|
|
78
82
|
never.append(path)
|
|
79
83
|
if not never.is_empty():
|
|
80
84
|
never.sort()
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
(
|
|
86
|
+
warnings
|
|
87
|
+
. append(
|
|
88
|
+
_finding(
|
|
89
|
+
"warning",
|
|
90
|
+
"imports",
|
|
91
|
+
GdhImportPipeline.never_imported_line(never),
|
|
92
|
+
"Run project_import reimport, or open the project in the editor, whose scan "
|
|
93
|
+
+ "imports them",
|
|
94
|
+
include_suggestions
|
|
95
|
+
)
|
|
88
96
|
)
|
|
89
97
|
)
|
|
90
98
|
|
|
@@ -106,33 +114,44 @@ func validate_project(params: Dictionary) -> Dictionary:
|
|
|
106
114
|
checks_performed.append("export_preset")
|
|
107
115
|
var named: Array[String] = GdhExportPresets.names()
|
|
108
116
|
if preset_name not in named:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
(
|
|
118
|
+
issues
|
|
119
|
+
. append(
|
|
120
|
+
_finding(
|
|
121
|
+
"error",
|
|
122
|
+
"export_preset",
|
|
123
|
+
(
|
|
124
|
+
"No export preset is named "
|
|
125
|
+
+ preset_name
|
|
126
|
+
+ (
|
|
127
|
+
": the project has none"
|
|
128
|
+
if named.is_empty()
|
|
129
|
+
else ": the presets are " + ", ".join(named)
|
|
130
|
+
)
|
|
131
|
+
),
|
|
132
|
+
"Pass one of the preset names, or add the preset with project_export "
|
|
133
|
+
+ "add_preset",
|
|
134
|
+
include_suggestions
|
|
135
|
+
)
|
|
124
136
|
)
|
|
125
137
|
)
|
|
126
138
|
else:
|
|
127
139
|
var gone: Array[String] = GdhExportPresets.missing_named(preset_name)
|
|
128
140
|
if not gone.is_empty():
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
141
|
+
(
|
|
142
|
+
warnings
|
|
143
|
+
. append(
|
|
144
|
+
_finding(
|
|
145
|
+
"warning",
|
|
146
|
+
"export_preset_files",
|
|
147
|
+
(
|
|
148
|
+
"The preset %s names files that are not there: %s"
|
|
149
|
+
% [preset_name, "; ".join(gone)]
|
|
150
|
+
),
|
|
151
|
+
"Add the files, or point the options at others with project_export "
|
|
152
|
+
+ "set_preset",
|
|
153
|
+
include_suggestions
|
|
154
|
+
)
|
|
136
155
|
)
|
|
137
156
|
)
|
|
138
157
|
|
|
@@ -187,9 +206,13 @@ func validate_project(params: Dictionary) -> Dictionary:
|
|
|
187
206
|
file.close()
|
|
188
207
|
|
|
189
208
|
if "# TODO" in content or "# FIXME" in content:
|
|
190
|
-
script_issues.append(
|
|
209
|
+
script_issues.append(
|
|
210
|
+
{ "path": script_path, "issue": "Contains TODO/FIXME comments" }
|
|
211
|
+
)
|
|
191
212
|
if "pass # TODO" in content:
|
|
192
|
-
script_issues.append(
|
|
213
|
+
script_issues.append(
|
|
214
|
+
{ "path": script_path, "issue": "Contains unimplemented functions" }
|
|
215
|
+
)
|
|
193
216
|
|
|
194
217
|
# Compiled by the server and handed in, as for the health check: a script the engine refuses
|
|
195
218
|
# stops the export's game at the first scene using it, which the comment check above never saw.
|
|
@@ -224,13 +247,17 @@ func validate_project(params: Dictionary) -> Dictionary:
|
|
|
224
247
|
# for never works, and the engine says so only while the game runs.
|
|
225
248
|
checks_performed.append("input_actions")
|
|
226
249
|
for entry: Dictionary in GdhInputActions.new(_log).undefined_in_scripts():
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
250
|
+
(
|
|
251
|
+
issues
|
|
252
|
+
. append(
|
|
253
|
+
_finding(
|
|
254
|
+
"error",
|
|
255
|
+
"input_actions",
|
|
256
|
+
GdhInputActions.undefined_line(entry),
|
|
257
|
+
"Add it with project_settings add_input_action, or correct the name the script "
|
|
258
|
+
+ "reads",
|
|
259
|
+
include_suggestions
|
|
260
|
+
)
|
|
234
261
|
)
|
|
235
262
|
)
|
|
236
263
|
|
|
@@ -268,14 +295,14 @@ func validate_project(params: Dictionary) -> Dictionary:
|
|
|
268
295
|
# Said beside the count, so a project of four hundred scripts is not read as checked whole.
|
|
269
296
|
"scripts_total": script_files.size(),
|
|
270
297
|
"issue_count": issues.size(),
|
|
271
|
-
"warning_count": warnings.size()
|
|
298
|
+
"warning_count": warnings.size(),
|
|
272
299
|
}
|
|
273
300
|
|
|
274
301
|
|
|
275
302
|
func _finding(
|
|
276
303
|
type: String, check: String, message: String, suggestion: String, include_suggestion: bool
|
|
277
304
|
) -> Dictionary:
|
|
278
|
-
var finding: Dictionary = {"type": type, "check": check, "message": message}
|
|
305
|
+
var finding: Dictionary = { "type": type, "check": check, "message": message }
|
|
279
306
|
if include_suggestion:
|
|
280
307
|
finding["suggestion"] = suggestion
|
|
281
308
|
return finding
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
@tool
|
|
2
2
|
extends RefCounted
|
|
3
|
-
|
|
4
3
|
## Where a property a tool writes lives: on the object given, on a resource built into it, or on an
|
|
5
4
|
## element of one of its lists that the write has to make first.
|
|
6
5
|
|
|
7
6
|
const GdhRead = preload("reading.gd")
|
|
8
|
-
|
|
9
7
|
const HEADINGS: int = PROPERTY_USAGE_CATEGORY | PROPERTY_USAGE_GROUP | PROPERTY_USAGE_SUBGROUP
|
|
10
8
|
|
|
11
9
|
|
|
@@ -95,11 +93,17 @@ static func _unlisted_in(items: Array, called: String, name: String, at: int) ->
|
|
|
95
93
|
var end: int = name.find("/", at + 1)
|
|
96
94
|
var index: String = name.substr(at + 1) if end < 0 else name.substr(at + 1, end - at - 1)
|
|
97
95
|
if items.is_empty():
|
|
98
|
-
return
|
|
96
|
+
return (
|
|
97
|
+
"%s holds no elements, so %s names none: give %s a whole list first."
|
|
98
|
+
% [called, name, head]
|
|
99
|
+
)
|
|
99
100
|
var last: int = items.size() - 1
|
|
100
101
|
if not index.is_valid_int():
|
|
101
102
|
return (
|
|
102
|
-
|
|
103
|
+
(
|
|
104
|
+
"%s is a list, so the step after it is the index of one of its elements, from 0 to "
|
|
105
|
+
+ "%d, not %s."
|
|
106
|
+
)
|
|
103
107
|
% [called, last, index]
|
|
104
108
|
)
|
|
105
109
|
var place: int = index.to_int()
|
|
@@ -116,8 +120,8 @@ static func _unlisted_in(items: Array, called: String, name: String, at: int) ->
|
|
|
116
120
|
if end < 0:
|
|
117
121
|
return (
|
|
118
122
|
(
|
|
119
|
-
"%s/%d is an element of %s, which a path does not replace alone: give %s a whole
|
|
120
|
-
+ "write a property of the element, as %s/%d/<property>."
|
|
123
|
+
"%s/%d is an element of %s, which a path does not replace alone: give %s a whole "
|
|
124
|
+
+ "list, or write a property of the element, as %s/%d/<property>."
|
|
121
125
|
)
|
|
122
126
|
% [head, place, called, head, head, place]
|
|
123
127
|
)
|
|
@@ -197,12 +201,15 @@ static func grow(target: Object, name: String, called: String) -> String:
|
|
|
197
201
|
above if not above.is_empty() else called,
|
|
198
202
|
count,
|
|
199
203
|
element.replace("_", " "),
|
|
200
|
-
"" if count == 1 else "s"
|
|
204
|
+
"" if count == 1 else "s",
|
|
201
205
|
]
|
|
202
206
|
)
|
|
203
207
|
if index > count:
|
|
204
208
|
return (
|
|
205
|
-
|
|
209
|
+
(
|
|
210
|
+
"%s, and a new one goes after the last, so %s%d cannot be written yet: write "
|
|
211
|
+
+ "%s%d first."
|
|
212
|
+
)
|
|
206
213
|
% [held, prefix, index, prefix, count]
|
|
207
214
|
)
|
|
208
215
|
if not adding.is_valid():
|
|
@@ -263,7 +270,10 @@ static func held_elsewhere(target: Object, name: String, home: String) -> String
|
|
|
263
270
|
var file: String = "" if held == null else held.resource_path.get_slice("::", 0)
|
|
264
271
|
if held != null and not held.is_built_in():
|
|
265
272
|
return (
|
|
266
|
-
|
|
273
|
+
(
|
|
274
|
+
"%s.%s is %s, a file of its own, so %s is written there, with resource_edit "
|
|
275
|
+
+ "modify on %s."
|
|
276
|
+
)
|
|
267
277
|
% [class_called(target), head, file, rest, file]
|
|
268
278
|
)
|
|
269
279
|
if held != null and not file.is_empty() and not home.is_empty() and file != home:
|
|
@@ -287,9 +297,9 @@ static func _built_in_elsewhere(
|
|
|
287
297
|
node = " on %s" % from.get_path_to(placed)
|
|
288
298
|
var text: String = (
|
|
289
299
|
(
|
|
290
|
-
"%s.%s is built into %s, so %s is written there, with scene_node set%s in %s, which
|
|
291
|
-
+ "it wherever that scene is used. To change it here alone, give %s a %s of
|
|
292
|
-
+ 'value with "_type" set to its class and its properties beside it.'
|
|
300
|
+
"%s.%s is built into %s, so %s is written there, with scene_node set%s in %s, which "
|
|
301
|
+
+ "changes it wherever that scene is used. To change it here alone, give %s a %s of "
|
|
302
|
+
+ 'its own: a value with "_type" set to its class and its properties beside it.'
|
|
293
303
|
)
|
|
294
304
|
% [class_called(target), head, file, rest, node, file, head, held.get_class()]
|
|
295
305
|
)
|