godotengine / godotengine/godot-visual-script

Add VisualScript tests to detect non-sequenced blocks without outputs

Open
#19 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
131
Forks
25
PR merge metrics
No merged PRs in 30d

Description

**Describe the project you are working on:** Godot demo projects

**Describe the problem or limitation you are having in your project:**

![](https://user-images.githubusercontent.com/1646875/86331059-8da62600-bc16-11ea-93ce-f1ce58ff46a1.png)

The above is pointless in VisualScript, since nothing can trigger this code block. It's not sequenced and has no outputs. This is part of a bug that I reported here https://github.com/godotengine/godot/issues/40046 but I'd like to propose a test to avoid these problems.

**Describe the feature / enhancement and how it helps to overcome the problem or limitation:**

I suggest implementing a system to check for engine-provided VisualScript code blocks that match both of these conditions:

* Has no outputs

* Is not sequenced

If anything matches, throw an error and fail the test, and print what caused the failure.

**Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:** Like ClassDB tests.

**If this enhancement will not be used often, can it be worked around with a few lines of script?:** No.

**Is there a reason why this should be core and not an add-on in the asset library?:** Yes, VisualScript is core, and parts of VisualScript being broken is a bug, so tests are important.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.