Skip to content

Commit b47daff

Browse files
committed
go back to parsing the rule name in the cache
I never updated the comment anyway...
1 parent c814520 commit b47daff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ruff/src/cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ impl LintCacheData {
442442
// Parse the kebab-case rule name into a `Rule`. This will fail for syntax errors, so
443443
// this also serves to filter them out, but we shouldn't be caching files with syntax
444444
// errors anyway.
445-
.filter_map(|msg| Some((msg.noqa_code().and_then(|code| code.rule())?, msg)))
445+
.filter_map(|msg| Some((msg.name().parse().ok()?, msg)))
446446
.map(|(rule, msg)| {
447447
// Make sure that all message use the same source file.
448448
assert_eq!(

0 commit comments

Comments
 (0)