Tins · lint

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.facts What the compiler knows and the text does not, fetched in one LSP batch. 1 struct · 1 function
  • mojolint.json A small JSON reader and writer — enough for JSON-RPC. 2 structs · 2 functions
  • mojolint.lsp A batch client for mojo-lsp-server. 3 structs · 3 functions
  • mojolint.rules The rules. Each is one function over a file's logical lines and its recovered structure, returning Findings. RULES is the table the CLI and the corpus harness read; add an entry and a branch in run_rule for L004. 2 structs · 7 functions
  • mojolint.structure Functions, parameters, structs and fields, recovered from logical lines by indentation alone. 5 structs · 5 functions
  • mojolint.tokenize Logical lines: Mojo source with comments removed, string contents blanked, and bracketed continuations joined. 1 struct · 3 functions