-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AP_Scripting: add lua-language-server checks and docs generation. #27001
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this is in CI, and fails PRs if not passing, then alls devs would need to be able to run the checks locally, so will all devs need to install brew ?
@IamPete1 maybe we could chat during the week and discuss the developer tooling implications? |
This is the install instructions: https://luals.github.io/#other-install There are several ways, I used homebrew because I found a example of using it for the install in GitHub actions. I have not tried any of the others. (nor am I really qualified to know which would be best for most people) |
Nice - looks like this is already part of the recommended VSCode extensions in AP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need a script in Tools/environment_install/install_lua_checker.sh
|
…d class keyword to globals
9d916b6
to
0956628
Compare
0956628
to
3005cb8
Compare
3005cb8
to
d60477d
Compare
This updates the docs and adds configuration and helpers to run lua-language-server. It is smarter than the current luacheck checks we run allowing type checking. https://luals.github.io/ This is the same checker that is used in by the recommended VSCode extension.
The new check is added as part of CI. Lots of stuff currently fails, rather than trying to fix (for the most part) this just adds overrides to ignore warnings in those files. The eventual goal would be to gradually resolve those warnings over time. Most of these failures are relatively harmless, but there are some quite nasty ones in there.
The tool checks the scripts against the lua documentation file, there are lots of updates to it to ensure that it is correct.
The check can be run locally (after installation) with
python ./Tools/scripts/run_lua_language_check.py
but the recommended way would be to use the VSCode extension which reports the same issues in any case (although we should add the VSCode config to point the extension at the new setup file).This also enables automatic generation of the docs in a easier to read
.md
format. This can be generated with./Tools/scripts/generate_lua_docs.sh
. This is added to CI and the docs are uploaded as a artefact.For example: ScriptingDocs.md
The eventual goal would be to convert this to a rst format for direct inclusion into the wiki.