code_check
Verify that Python imports, names, attributes, and JVM classes, methods, fields, and Mixin targets exist in your project environment, classpath, or JDK; supports paths, diffs, and snippets.
Instructions
Python, Java, Kotlin, TS/JS imports; other languages: not_checked (exit 4). Python: do the modules, imported names, attributes, keyword arguments and constant dict keys it uses exist in the project's environment (.venv/venv/env; env=PATH another venv; 'none' = standard library only)? JVM: classes, methods (arity), fields, Mixin targets in the project, its classpath (a Loom build or code_check.classpath) and the JDK. Input: paths, or diff (a revision; nothing given: changes against HEAD), or snippet + as_path. Each site: exists | absent (nearest names) | unknown (why) | not_installed | guarded. exit 3 = absent or a version differs from the lock. Read-only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | 'auto' (default: the project's .venv, venv or env), a virtual environment directory whose base interpreter is a Python installation this system knows, outside the project (nothing the repository supplies is started), or 'none' (standard library only). | |
| diff | No | A revision: check only the sites on lines changed against it, plus new files (e.g. 'HEAD'). | |
| paths | No | Repository-relative files or directories to check (whole files). | |
| as_path | No | With snippet: the repository-relative file it is meant for (imports and relative imports resolve from there). | |
| snippet | No | Python code not written yet, checked as if it were in as_path. | |
| include_exists | No | Also list the sites that exist. |