As a Roblox developer, making script diagnostics tools is incredibly difficult. I have been working on an intellisense tool to allow developers to import types globally using things like JSDoc style type hints, and provide autocomplete for a game framework where the current type solver can’t reasonably solve. However it has proven very very difficult to create proper linting, because upon registering a script analysis callback, that callback runs for every single script in the entire game immediately.
This means that parsing that code, trying to perform static analysis and properly resolve script diagnostics is easy and fast enough for one script, but with this behavior it involves writing your own system for getting every script in the game and analyzing it on your own time over several frames, then creating a potentially massive diagnostics cache (which intellisense systems are already fighting for every bit of memory they can), and then registering the callback just so that you don’t get an extreme lag spike when the plugin starts. Luau is just too slow to properly lint every script immediately like this, and it makes my job much harder
I think Luau having a standardised documentation comment syntax like C# or JS/TS could go a long way to improving module usage.
Luau can already assign functions documentation comments, so why not standardise a spec for it (and maybe expand it to types and tables).
I’ve suggested TSDoc as a suitable option to base the syntax off of before, and thats because its a fairly good syntax for gradually typed scripting langs.
Yeah, I mean I started off just making a plugin to provide autocomplete for magic functions, then I realized if I wanted in depth autocomplete i’d have to create a type solver, and then with all of this type information decided to leverage it into comment directives. It works great for autocomplete, but because of this current behavior that script diagnostics provides, generating useful linting is extra difficult. I’d really love to see a world where plugins can feel like extensions of the lsp, and I’ll be sure to open source my own when it’s ready, but with the amount of work required to perform all of this static analysis in the first place, and then not being able to leverage it with linting is the type of hurdle that can be very demotivating.