Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 875 Bytes

README.md

File metadata and controls

41 lines (30 loc) · 875 Bytes

GDScript-linter

COMPATIBLE WITH 2.1 - NOT TESTED ON 3.x/4.x

Why?

I want to use a third party IDE, and I'm tired of having to use the Godot Editor to check if the code is correct.

Setup

sudo apt-get install python3
sudo pip3 install lark-parser

Usage

python3 ./parser.py path-to-file.gd

Contribute

See Lark

TODO

  • Lark grammar for GDscript
  • Parse function call
  • Parse for statement
  • Parse while statement
  • Parse if statement
  • *Parse expr statement (partial)
  • Parse function definition
  • Parse var/const/enum declaration
  • Parse return statement
  • Detect variable shadowing
  • Detect undefined variable usage (simple)
  • Detect undefined variable usage (deep check)
  • Detect unused variables
  • Deep check inheritance