v0.1.6
gdstyle 0.1.6
Patch release fixing a parser bug that caused order/class-member-order
false positives on inner classes whose first body line was a comment.
Fixed
-
order/class-member-orderno longer fires on every inner-class
member when the inner class body starts with a comment-only line
(#or##on its own line, e.g. a leading doc comment). The lexer
was preserving the indent stack on any comment-only line, so the
parser saw noIndentat the start of the body, returned an empty
inner class, and the followingvar/functokens fell back to the
outer parse loop. Every inner-class member then looked like a
sibling of the inner class and tripped the ordering rule.The lexer now splits comment-only line handling into three cases
by relative indent: same indent preserves the stack (unchanged),
shallower indent uses the existing peek-ahead to disambiguate
boundary vs mid-body noise (unchanged), and deeper indent falls
through toIndentemission so the leading comment opens the new
block.Reported in #5 with
a full root-cause trace from the reporter.
Install
CLI from crates.io:
cargo install gdstyleOr grab a prebuilt binary from this release page, drop it on your
PATH, and run gdstyle in your project directory.
For the Godot editor plugin: download gdstyle-godot-plugin.zip from
this release, extract the addons/gdstyle/ folder into your Godot
project, then enable the plugin in Project > Project Settings >
Plugins.
For the pre-commit framework, bump your
config to:
- repo: https://github.com/atelico/gdstyle
rev: v0.1.6
hooks:
- id: gdstyle
- id: gdstyle-fmtor run pre-commit autoupdate.
Full documentation, rule list, configuration reference, and the
GDExtension API live in the README.
Full Changelog: v0.1.5...v0.1.6