GDQuest / GDQuest/GDScript-formatter

Reordering granularity

Open
#317 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
455
Forks
39
Avg merge
1d 15h
Merged PRs (30d)
4

Description

I like when reordering feature is applied to variables inside the file.

But I'd prefer to avoid reordering the functions.
- Sometimes I have a public function and a related private helper. It reads better when this private function located right after use. When code reordering is enabled, it might end up after a bunch of public functions.
- Sometimes I have static private helpers and they come first in the file. I read code top to bottom, so I'd prefer them to be located after when they used by public or virtual functions.

I know it contradicts the official style guide, but it would be nice to have a CLI option that enables only variables reordering.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the formatter's existing reordering option and its handling of variables and functions. Define completion as a CLI mode that reorders variables while leaving functions in source order, with tests covering both behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
godot, rust
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.