Add settings validation to lib.rs

This commit is contained in:
Charlie Marsh 2022-12-26 10:12:07 -05:00
parent debd909b2c
commit 8c018e8261

View file

@ -106,6 +106,9 @@ pub fn check(path: &Path, contents: &str, autofix: bool) -> Result<Vec<Check>> {
// Load the relevant `Settings` for the given `Path`.
let settings = resolve(path)?;
// Validate the `Settings` and return any errors.
settings.validate()?;
// Tokenize once.
let tokens: Vec<LexResult> = tokenize(contents);