godot-gdscript-toolkit
godot-gdscript-toolkit copied to clipboard
`gdlint`: Calling `super._ready()` raises error
Here's an example of the use-case implementation
class_name Parent
extends Node
func _ready() -> void:
print("Hello from Parent")
extends Parent
func _ready() -> void:
super._ready() # Private method "_ready" has been called (private-method-call)
print("Hello from Child")
I was looking around to see if calling super._ready() or super._process(delta) was a bad practice, but from what I've read it seems to be a relatively common way of doing things. So ideally I think calling private methods on super should be fine.
Similar to #283
I think this is a more general problem with this rule. In gdscript the styleguide says you should start the name of virtual methods with an _, even if the methods are intended to be public. Using the same character for two different meanings makes it pretty difficult to handle with a linter/formatter.
Maybe it is worth removing this rule from the linter?
I think this is a more general problem with this rule. In gdscript the styleguide says you should start the name of virtual methods with an
_, even if the methods are intended to be public. Using the same character for two different meanings makes it pretty difficult to handle with a linter/formatter.Maybe it is worth removing this rule from the linter?
Yes, I'll probably remove that rule as it makes very little sense in case of GDScript
I made a proposal to update the style guide. Not sure if it will go anywhere yet but I figured it was worth sharing here as it is directly related to this issue.