Scony / godot-gdscript-toolkit

Independent set of GDScript tools - parser, linter, formatter, and more
MIT License
1.02k stars 70 forks source link

[3.x] Better errors linting inline `extends` syntax #321

Open davidpeck-littlemonkey opened 2 months ago

davidpeck-littlemonkey commented 2 months ago

I've a class person.gd:

class_name Person extends Node

var name: String

when I lint I get:

# gdlint ./person.gd
./person.gd:3: Error: Definition out of order in global scope (class-definitions-order)
Failure: 1 problem found

I would expect either no errors, or some error "inline extends not allowed" but instead it complains about the order of name

Scony commented 2 months ago

Looks like bug - thanks for reporting!

Scony commented 1 month ago

@davidpeck-littlemonkey what is the version of gdtoolkit you use? With latest main I get no errors with the above.

Scony commented 1 month ago

I've checked and I think you're using an outdated gdtoolkit. Please update to the latest one or if I'm wrong, please paste the full gdscript file, as I may be missing some context.

davidpeck-littlemonkey commented 1 month ago

@Scony sorry for the delay. This was with v3.5.0 (I'm using Godot v3). Is v3 still being maintained?

Scony commented 1 month ago

Ok, in that case, I'll need to fix that. Thanks for reporting!