New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cli paramerter --check-only for script parsing #19280
Conversation
main/main.cpp
Outdated
@@ -1383,6 +1387,10 @@ bool Main::start() { | |||
ERR_EXPLAIN("Can't load script: " + script); | |||
ERR_FAIL_COND_V(script_res.is_null(), false); | |||
|
|||
if (check_only) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a style issue here (two spaces before {
, should be one).
Please squash the commits together, see PR workflow. |
main/main.cpp
Outdated
@@ -1239,6 +1240,7 @@ bool Main::start() { | |||
String test; | |||
String _export_preset; | |||
bool export_debug = false; | |||
bool check_only = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value should be false
, otherwise check-only
is always enabled.
Use clang formatter to fix the formatting. |
I did use clang formatter. The Travis CI build now failed with
and
Looks like a bug in the CI script. Can I force to rerun the checks? |
It happens every now and then when the scons server does not respond to the download request. I've restarted that build job. |
Any idea when this will make it into a release? I see it didn't make the 3.0.5 cut, but I'm looking forward to using it! |
Also, this sounds really cool, is there a ticket to track this? |
@rcorre it has been merged already so it will be in 3.1 for sure. |
This allows basic error checking for GDScript files to be used in Continuous Integration and/or in external editors. For example, the following errorformat can be used in vim to get an error parsed: '%E%.%#SCRIPT\ ERROR:\ GDScript::reload:\ %.%#1m%m,%Z%>%.%#res://%f:%l%.%#'
Actually I was thinking about creating a basic toolchain for GDScript, which would simply be a set of CLI tools around the gdscript module. Besides error checking, code completion and symbol/doc lookup could be provided. This is also an alternative solution to the proposed server in #2245
I haven't found time yet and would be happy hearing your thoughts on this. Is there any interest in this?