GD

gdformat + gdlint

GDScript auto-formatter and linter from the gdtoolkit package

Details

Language / Topic
gdscriptGDScript
Category
Linter / Formatter

Rules

balanced
- Use `gdformat` (from `gdtoolkit`) to auto-format `.gd` files — run it on save or as a pre-commit hook to enforce consistent indentation and spacing.
- Use `gdlint` to catch style violations: missing type annotations, incorrect naming conventions, and unused variables.
- Run `gdlint res://` and `gdformat --check res://` in CI to reject unformatted or non-compliant code before merging.
- Configure `gdlint` with a `.gdlintrc` file to customize rules for your project — enable `function-argument-number` and `max-file-lines` checks.
- Use `gdformat` with `--line-length 100` if the default 100-character limit does not fit your project's style.
- Add `gdformat` and `gdlint` to a `pre-commit` hook using `pre-commit` framework: fails the commit if any file needs reformatting.
- Pin `gdtoolkit` to a specific version in `requirements.txt` so formatting output is deterministic across all developer machines.