mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 05:45:24 +00:00
Properly combine CLI and pyproject.toml ignores and selects (#329)
This commit is contained in:
parent
f80d5e70dd
commit
5bf8b13644
7 changed files with 195 additions and 162 deletions
|
@ -44,7 +44,7 @@ pub(crate) fn check_path(
|
|||
|
||||
// Run the AST-based checks.
|
||||
if settings
|
||||
.select
|
||||
.enabled
|
||||
.iter()
|
||||
.any(|check_code| matches!(check_code.lint_source(), LintSource::AST))
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ pub(crate) fn check_path(
|
|||
checks.extend(check_ast(&python_ast, contents, settings, autofix, path))
|
||||
}
|
||||
Err(parse_error) => {
|
||||
if settings.select.contains(&CheckCode::E999) {
|
||||
if settings.enabled.contains(&CheckCode::E999) {
|
||||
checks.push(Check::new(
|
||||
CheckKind::SyntaxError(parse_error.error.to_string()),
|
||||
Range {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue