Skip to content

Commit 6908e26

Browse files
authored
Filter ruff_linter::VERSION out of SARIF output tests (#19280)
Summary -- Fixes the test failures in #19279. This is the same variable used to construct the SARIF output: https://github.com/astral-sh/ruff/blob/350d563c883cae8c16f376946ae5f2d0fc111e3b/crates/ruff_linter/src/message/sarif.rs#L39-L44 Test Plan -- Existing tests with the modified filter
1 parent 25c4295 commit 6908e26

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

crates/ruff/tests/lint.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5723,6 +5723,7 @@ match 42: # invalid-syntax
57235723
filters => vec![
57245724
(tempdir_filter(&tempdir).as_str(), "[TMP]/"),
57255725
(r#""[^"]+\\?/?input.py"#, r#""[TMP]/input.py"#),
5726+
(ruff_linter::VERSION, "[VERSION]"),
57265727
]
57275728
}, {
57285729
assert_cmd_snapshot!(

crates/ruff/tests/snapshots/lint__output_format_sarif.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ exit_code: 1
132132
}
133133
}
134134
],
135-
"version": "0.12.2"
135+
"version": "[VERSION]"
136136
}
137137
}
138138
}

0 commit comments

Comments
 (0)