Tins · Utilities
lint
mojolint, a linter for the origin and threading mistakes the Mojo compiler accepts, asking mojo-lsp-server, the compiler's own frontend, for resolved types and uses. A proof of concept.
Install
plain pixi:
pixi init app -c https://conda.modular.com/max -c conda-forge && cd app
sed -i.bak 's/^\[workspace\]/[workspace]\npreview = ["pixi-build"]/' pixi.toml
pixi add "mojo-compiler==1.2.0"
# Without mojoshelf: the tin as a git dependency at its published commit.
# Transitive dependencies may be wrong: pixi takes the tin's own git deps as
# pinned in its pixi.toml, which may not match what other tins pin, and then
# fails with "duplicate records". mojoshelf picks revisions that agree.
pixi add lint-mojo --git https://github.com/magmalake/lint.mojo --rev 5799cd56eca15ad142a9c8ba300ad45c5eca96f4 No mojoshelf needed. If pixi reports duplicate records, the mojoshelf tab picks revisions that agree.
Version
0.1.4 on mojoshelf
What it does
Works today
- Text mode needs nothing; --lsp uses the project's own mojo-lsp-server
- Run in CI by the magmalake tins
Correctness
Checked against threads.example's uncaught programs flagged, and the correct ones beside them silent