CLI - Showing GDScript Warnings

Godot Version

4.6

Question

Hello!

I use the Godot CLI for checking gdscript code errors this way: godot --quit --headless --check-only

However, it doesn’t show warnings that Editor shows (that i set in Project Settings / General / Debug / GDScript, such as «Unsafe Method Access»)

I couldn’t find an option to do that :downcast_face_with_sweat:

  1. Is there a way to show gdscript parse warnings using godot CLI?
  2. In case if not, should i create an issue in godot repo?

P.S:

  • I don’t want to use LSP
  • I don’t want to turn «Unsafe Method Access» into error

You could try GitHub - Scony/godot-gdscript-toolkit: Independent set of GDScript tools - parser, linter, formatter, and more

Or perhaps another linter..

1 Like

I don’t think this is currently possible, so please open a proposal for this on the Godot proposals repository.

I found a solution.

Adding --debug prints warnings in addition to errors

My command looks like this

godot --quit --headless --check-only --debug

However, godot can drop into debugger → user’s input is required to finish running. I don’t care about it for now. I just use timeout to kill this potentially infinitely running command

1 Like

Thanks) I’ll take a look) Linter does look like something useful

Though, I found a non-obvious solution using the godot cli

Thank you for participation. I found a non-obvious solution, though :grin: