About this project

GDScript Toolkit is an independent set of tools for GDScript, the scripting language used in the Godot game engine. It includes a parser that generates a parse tree for debugging and educational purposes, a linter for static analysis based on configurable rules, a formatter that reformats code according to predefined style rules, and a code metrics calculator that computes cyclomatic complexity for functions and classes. Installation is done via pip or pipx, with separate package versions for Godot 4 (`gdtoolkit==4.*`) and Godot 3 (`gdtoolkit==3.*`). The latest development version can be installed directly from the Git repository. The main command-line tools are: - `gdlint`: lints GDScript files and reports style and potential issues. - `gdformat`: formats GDScript files according to the toolkit's style rules. It is recommended to use with version control due to potential data loss. - `gdparse`: parses GDScript files and outputs a tree representation of the code structure. - `gdradon`: calculates cyclomatic complexity, similar to Radon for Python. The toolkit also provides a GitHub Action for easy integration into CI workflows, and can be used as a pre-commit hook via the provided configuration. Development is open to contributions, with a request to refer to or create an issue before implementing changes.