Expand description
Import-hygiene lints — the pit-of-success guardrails that keep a project’s import blocks honest. An UNRESOLVABLE import is already a hard error at assembly (with a “did you mean” suggestion from the loader); this pass finds the problems that ASSEMBLE FINE but are still mistakes: an import that is never used, the same module imported twice, and a module importing itself.
The pass is deliberately separate from assemble_project
so the assembler stays a pure Result-or-Err function; largo check runs this
on top and surfaces the findings (warnings keep exit 0; errors fail).
Structs§
- Import
Lint - One import-hygiene finding.
Enums§
- Import
Lint Kind - What kind of import-hygiene problem was found.
- Lint
Severity - The severity of an import lint. Warnings never block a build; errors do.
Functions§
- lint_
imports - Lint the entry file’s imports for unused / duplicate / self-import problems.
Unresolvable imports are NOT reported here — the assembler already rejects
those with a suggestion. Returns
Erronly if the entry can’t be read. - lint_
imports_ with_ deps lint_imports, resolving imports with the declared dependency roots so apath/git-local import is lint-checked too.dep_rootsempty is identical tolint_imports.