v0.1.3
gdstyle 0.1.3
Patch release fixing a false positive in quality/unreachable-code.
Fixed
-
quality/unreachable-codeno longer flags the closing)of a
multi-linereturnstatement as unreachable. The previous
implementation was line-based and walked forward from each
return/break/continuelooking for any same-indent non-blank
line. The closing)ofreturn floori(\n\t\t1.2\n\t)lands at the
same indent asreturn, so it was wrongly reported.The rule now tracks open-bracket depth (
([{) and backslash
continuation across lines, masking delimiters inside string literals
and trailing#comments. While areturnstatement is still
syntactically open, subsequent lines are treated as continuation of
that same statement. True positives — actual code at the same indent
AFTER the statement closes — are still flagged.Reported in #3.
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.3
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.2...v0.1.3