Skip to main content

Crate easement

Crate easement 

Source
Expand description

easement, an architecture quality gate, as a library: commands answers each command of the binary, which only parses the arguments and prints.

Modules§

commands
What each command computes, from what it was asked to its answer. The binary (main.rs) only parses the arguments, prints the answer and turns its outcome into an exit code; everything it says is decided here.

Structs§

Cache
Parsed files kept between scans, so watch mode re-reads only what changed, and how the indexes are obtained. Resolution is never cached: it depends on the other files.
Coverage
What an answer leaves out: the part it was asked to judge, the code it could not read or judge, and the gaps the policy accepts. A cache hit is none of them.
Environment
The environment the indexers run in, which their cache key reads too: the variables of the process easement runs in, unless the caller sets others, and the platform it runs on, which decides which indexers can run.
EvidenceGap
Code or facts that a check could not read or judge.
Indexing
How the indexes are obtained: from the cache in cache_dir as cache says, by indexers that run in environment, jobs languages at once.
Jobs
How many languages are indexed at once (--jobs): one by default, since scip-java and rust-analyzer can each take gigabytes. The directories of one language are always indexed one after another: they share its build state (Maven’s repository, the lock of cargo’s target).
NotCached
--cache-only met an index that is not cached: the indexer would have to run.
Place
A place in the code, as {file, line}, and the module an import writes there as specifier when that is what the place is about.

Enums§

CacheUse
How indexes are obtained: run the indexer, or read a cached index first, or only read one.
GapKind
GraphFormat
Platform
The operating system easement runs on, which decides which indexers can run.

Constants§

DEFAULT_CONFIG

Functions§

cannot_index
Why the indexer of language (a registry name, python) cannot run on platform; None when it can, or when the language has no indexer.
default_cache_dir
Where indexes are kept between runs by default: EASEMENT_CACHE_DIR of environment, else the user’s cache directory; None when there is neither.
schema_text
The schema as easement schema prints it and the repository keeps it in easement.schema.json.