API reference
The mojolint package, from lint 0.1.4, as published on mojoshelf (commit 5799cd56eca1), by mojo doc from Mojo 1.2.0.
Source.
mojolint — pattern lints for the origin and thread-safety mistakes the Mojo compiler accepts. Text-only by default; with --lsp, the rules ask mojo-lsp-server for resolved types and name-resolved uses. A proof of concept; see the README.
Modules
-
mojolint.factsWhat the compiler knows and the text does not, fetched in one LSP batch. 1 struct · 1 function -
mojolint.jsonA small JSON reader and writer — enough for JSON-RPC. 2 structs · 2 functions -
mojolint.lspA batch client formojo-lsp-server. 3 structs · 3 functions -
mojolint.rulesThe rules. Each is one function over a file's logical lines and its recovered structure, returningFindings.RULESis the table the CLI and the corpus harness read; add an entry and a branch inrun_rulefor L004. 2 structs · 7 functions -
mojolint.structureFunctions, parameters, structs and fields, recovered from logical lines by indentation alone. 5 structs · 5 functions -
mojolint.tokenizeLogical lines: Mojo source with comments removed, string contents blanked, and bracketed continuations joined. 1 struct · 3 functions