Commit 4df642d
committed
fix(audit): treat *_fixture(s).rs as test paths in is_test_path
Shared test-fixture modules like src/commands/trace/test_fixture.rs are
declared `#[cfg(test)] mod test_fixture;` and consumed only by sibling
*_tests.rs files, but is_test_path did not recognize them — it matched
_test.rs / _tests.rs / test.rs / tests.rs but not *_fixture(s).rs. As a
result the fixture's setup code (fs writes, git process spawns to build
scenarios) was scanned as production command code and flagged by the
thin_command_adapter detector.
Extend is_test_path filename detection to cover `*_fixture.rs` and
`*_fixtures.rs`. This is precise: test_fixture.rs ends with _fixture.rs
and is now excluded, while the existing negative case test_helpers.rs
(deliberately NOT a test path) is preserved.
Resolves #8335.1 parent f9ca51b commit 4df642d
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
| 141 | + | |
| 142 | + | |
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
| |||
219 | 224 | | |
220 | 225 | | |
221 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
222 | 231 | | |
223 | 232 | | |
224 | 233 | | |
| |||
0 commit comments