pub fn run_and_print_checks<I, P>(
    input_files: I,
    checks: &[Check],
    recursive: bool
) -> Result<bool, Box<dyn Error>>
where P: AsRef<Path>, I: AsRef<[P]>,
Expand description

Validates a given set of input_files under the specified checks, and prints a summary of the results.

In recursive mode, subregion files of the given input files are also validated.

If all checks were run without encountering a fatal error, returns true if all checks passed and false otherwise.

Examples

let passed = run_and_print_checks(
    ["/path/to/symbols.yml", "/path/to/other_symbols.yml"],
    &[
        Check::ExplicitVersions,
        Check::FunctionNames([NamingConvention::SnakeCase].into()),
    ],
    true,
)
.expect("Fatal error occurred");