pub fn load_path(path: &Path) -> LoadedExpand description
Loads, resolves and lints one contract file. Schema paths are relative to the file’s directory.
Examples found in repository?
examples/zk2-check.rs (line 17)
14fn main() {
15 let mut ok = true;
16 for arg in std::env::args().skip(1) {
17 let l = load_path(Path::new(&arg));
18 print!("{}", l.report);
19 match l.contract {
20 Some(c) => println!("{arg}: {} {}", c.iface, Fingerprint::of(&c)),
21 None => {
22 println!("{arg}: invalid");
23 ok = false;
24 }
25 }
26 }
27 std::process::exit(i32::from(!ok));
28}