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
Update code order with static annotation on gdscript_styleguide.rst #8920
base: master
Are you sure you want to change the base?
Conversation
Update code order on gdscript_styleguide.rst by inserting static variables and methods on the code order as a proposal
Personally, I prefer to place static members before non-static ones, so I would suggest the following order:
(Actually, I use a slightly different order.) |
Ok currently i have been thinking of changing this part a bit differently to be better understanble and to not overweight the code order with the access modofiers beceause it makes doublons and harder to read, i'll do a litle update |
I Agree with what you said beceause they should be easily findable |
I implemented @dalexeev proposal and i simplified the code order by splitong the access modifiers order specification, the overrided methods from Godot base class and renaming some explanation to make it clearer
I just rearanged the code order i missed to do in last commit
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
@AThousandShips I commited your reviews, is it fine now to merge the branch ? |
It needs an approval first |
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: Danil Alexeev <[email protected]>
Co-authored-by: Danil Alexeev <[email protected]>
Co-authored-by: Danil Alexeev <[email protected]>
Co-authored-by: Danil Alexeev <[email protected]>
Co-authored-by: Danil Alexeev <[email protected]>
Co-authored-by: Danil Alexeev <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Is it possible to have an approval on this to merge the branch @AThousandShips ? |
That's dalexeev's area :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -715,26 +715,38 @@ We suggest to organize GDScript code this way: | |||
|
|||
:: | |||
|
|||
01. @tool | |||
01. ``@tool``, ``@icon``, ``@static_unload`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
01. ``@tool``, ``@icon``, ``@static_unload`` | |
01. @tool, @icon, @static_unload |
Sorry, I didn't notice that the list is already inside the code block.
16. public methods | ||
17. private methods | ||
18. subclasses | ||
12. ``_static_init()`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
12. ``_static_init()`` | |
12. _static_init() |
10. remaining variables | ||
11. @onready variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10. remaining variables | |
11. @onready variables | |
10. remaining regular variables | |
11. @onready variables |
I'm not sure how best to say "except @onready
".
Update code order on gdscript_styleguide.rst
by inserting static variables and methods on the code order as a proposal