[ty] Allow overriding rules for specific files (#18648)

This commit is contained in:
Micha Reiser
2025-06-15 15:27:39 +02:00
committed by GitHub
parent 782363b736
commit 3a430fa6da
31 changed files with 1945 additions and 312 deletions

View File

@@ -290,7 +290,10 @@ impl<'a> CheckSuppressionsContext<'a> {
}
fn is_lint_disabled(&self, lint: &'static LintMetadata) -> bool {
!self.db.rule_selection().is_enabled(LintId::of(lint))
!self
.db
.rule_selection(self.file)
.is_enabled(LintId::of(lint))
}
fn report_lint(
@@ -315,7 +318,7 @@ impl<'a> CheckSuppressionsContext<'a> {
range: TextRange,
message: fmt::Arguments,
) {
let Some(severity) = self.db.rule_selection().severity(LintId::of(lint)) else {
let Some(severity) = self.db.rule_selection(self.file).severity(LintId::of(lint)) else {
return;
};