Scony / godot-gdscript-toolkit

Independent set of GDScript tools - parser, linter, formatter, and more
MIT License
944 stars 65 forks source link

`gdlint`: Calling static private method from inside the same class raises error #283

Closed hungpt-a8e closed 4 days ago

hungpt-a8e commented 6 months ago

If you try to call static private method of a class from inside the same class gdlint will raise an error, for example:

class_name Foo

func _foo() -> void:
    Foo._bar() # gdlint: Error: Private method "_bar" has been called (private-method-call)

static func _bar() -> void:
    pass

I think private members should be allowed to be called from inside the same class and gdlint should not raise errors in this situation.

Scony commented 4 days ago

This check is now removed.