mirror of https://github.com/astral-sh/ruff
Add settings validation to lib.rs
This commit is contained in:
parent
debd909b2c
commit
8c018e8261
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue