Developer tools for ucode

Hello everyone,

I developed a package to allow login in LuCI through OIDC (allowing passwordless logins) using mostly ucode and a bit of C. While I was doing this I realized that there aren't many dev tools and I was hand-writing simple versions for my project only. I've extracted those to their own repos:

utest: A modern, non-invasive testing framework for ucode, OpenWrt's scripting language

tree-sitter-ucode: Tree-sitter grammar for ucode, the ECMAScript-like scripting language used in OpenWrt

ucode-lint: Static linter for ucode, the OpenWrt scripting language

These are still in early days, but they are functional. I even forked and wrote tests for firewall4 using utest, as a proof of concept. The tree sitter grammar can be used to add syntax highlight in neovim and vscode.

I would love to hear from package developers what they think about the tools; any feedback is greatly appreciated :slight_smile:

2 Likes

I've created an LSP for ucode, though it's primarily deployed through the VS Code extension store and npm. https://github.com/NoahBPeterson/ucode-lsp/

I like the popen lint: that's something I don't warn on, but I will certainly consider adding to my tool :wink:

I made an attempt at basing my LSP off of tree-sitter, but never finished the port before moving onto shinier objects (more lints, more type inference).

Please feel free to reuse my LSP's openly-licensed code or offer suggestions :slight_smile:

1 Like

Thanks Noah I already have installed your extension and using it for my little ucode things I do, useful for developers like me who do not use ucode daily :slight_smile: