Skip to main content

contract_lints

Function contract_lints 

Source
pub fn contract_lints(
    h: &Htl,
    root: &Path,
    cfg: &HtlConfig,
    contracts: &[Resolved],
    file: &Path,
) -> Result<Vec<String>>
Expand description

contract lint for one file: when file sits directly under the directory a contract holds (relative to root, the directory holding htl.toml), check it against that contract statically. Returns lint lines (empty when none applies).

contracts comes from contract::resolve, which reads the ---@contract markers; resolving once per run rather than once per file is the caller’s job.