Skip to content
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

Merged
merged 1 commit into from Jun 1, 2018
Merged

Add cli paramerter --check-only for script parsing #19280

merged 1 commit into from Jun 1, 2018

Conversation

clktmr
Copy link
Contributor

@clktmr clktmr commented May 30, 2018

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?

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) {
Copy link
Member

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).

@akien-mga
Copy link
Member

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;
Copy link
Member

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.

@swarnimarun
Copy link
Contributor

Use clang formatter to fix the formatting.

@clktmr
Copy link
Contributor Author

clktmr commented Jun 1, 2018

I did use clang formatter. The Travis CI build now failed with

unzip:  cannot find zipfile directory in one of scons-local-3.0.1.zip or
scons-local-3.0.1.zip.zip, and cannot find scons-local-3.0.1.zip.ZIP, period.

and

scons: command not found

Looks like a bug in the CI script. Can I force to rerun the checks?

@akien-mga
Copy link
Member

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.

@akien-mga akien-mga merged commit 6c1d71e into godotengine:master Jun 1, 2018
@rcorre
Copy link
Contributor

rcorre commented Jul 25, 2018

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!

@rcorre
Copy link
Contributor

rcorre commented Jul 25, 2018

Actually I was thinking about creating a basic toolchain for GDScript, which would simply be a set of CLI tools around the gdscript module

Also, this sounds really cool, is there a ticket to track this?

@swarnimarun
Copy link
Contributor

@rcorre it has been merged already so it will be in 3.1 for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants