# 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.

## Modules

- [mojolint.facts](https://magmalake.dev/s/lint/api/facts.md): What the compiler knows and the text does not, fetched in one LSP batch.
- [mojolint.json](https://magmalake.dev/s/lint/api/json.md): A small JSON reader and writer — enough for JSON-RPC.
- [mojolint.lsp](https://magmalake.dev/s/lint/api/lsp.md): A batch client for `mojo-lsp-server`.
- [mojolint.rules](https://magmalake.dev/s/lint/api/rules.md): The rules. Each is one function over a file's logical lines and its recovered structure, returning `Finding`s. `RULES` is the table the CLI and the corpus harness read; add an entry and a branch in `run_rule` for L004.
- [mojolint.structure](https://magmalake.dev/s/lint/api/structure.md): Functions, parameters, structs and fields, recovered from logical lines by indentation alone.
- [mojolint.tokenize](https://magmalake.dev/s/lint/api/tokenize.md): Logical lines: Mojo source with comments removed, string contents blanked, and bracketed continuations joined.

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.
