1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use std::collections::BTreeMap;
use anyhow::Result;
use move_lang::{
self,
shared::{AddressBytes, Flags},
Compiler,
};
pub fn check(
interface_files: &[String],
sources_shadow_deps: bool,
files: &[String],
named_addresses: BTreeMap<String, AddressBytes>,
verbose: bool,
) -> Result<()> {
if verbose {
println!("Checking Move files...");
}
Compiler::new(files, interface_files)
.set_flags(Flags::empty().set_sources_shadow_deps(sources_shadow_deps))
.set_named_address_values(named_addresses)
.check_and_report()?;
Ok(())
}