Skip to main content

Linting and a language server

· One min read
Balaur

One definition of what is wrong with a script, served two ways: the Problems dock in the editor, and balaur lsp in your own editor.

What landed

  • What is checked. A script or prefab a node names that does not exist. An asset reference — a texture, a material, a mesh — that does not resolve, checked as written and as project-relative. A component missing what it expects beside it. A shader that will not link, with the file, line and column the author wrote.
  • The Problems dock. Every root script and the scene, re-checked on save. A row marks an error with ×.
  • balaur lsp. Speaks LSP on stdin and stdout and calls the same check_source the dock calls. It boots the project once and blocks on stdin; a finding carries where its span ends, for a client that underlines a range.
  • From a script. script::check(path) is the same answer for a tool.
balaur lsp my-game # point your editor's LSP client at it

Scripting covers what a save that does not compile reports.