Repository navigation
Commit 74fcbc1
committed
review: harden self-owned-property exemption + baseline parsing (PR #156)
Addresses the Codex/CodeRabbit review on #156:
- IsSelfOwnedSource: gate the get-only-property exemption to a THIS/bare access
(`Channel` / `this.Channel`). `other.Channel.Event += h` reaches another
instance's property, which may outlive this subscriber, so it stays flagged
(Codex P2).
- PropertyReturnsOwnedMember: require the returned member's CONTAINING TYPE to be
the analyzed class, not just a name match — a same-named field on another type
no longer satisfies ownership (CodeRabbit, major).
- RefExchangeNulledField: also accept `default(T)` (DefaultExpressionSyntax), not
only the `default` literal — `Interlocked.Exchange(ref _f, default(Timer))`
was missed (CodeRabbit, minor).
- oracle_compare _load_baseline: reject an empty message-substring (it would make
`substr in message` a wildcard a typo could turn into a blanket suppressor),
and preserve `|` in the reason via join (CodeRabbit, major). Selftest extended
(31 checks).
- field-dispose-via-helper/notes.md: drop the obsolete caveat — the
Interlocked.Exchange teardown is now covered by the field-dispose-via-exchange
fixture, not baselined (CodeRabbit, minor).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019846YSZ35c7CdkWQ1qX5gm1 parent edbf203 commit 74fcbc1
3 files changed
Lines changed: 42 additions & 25 deletions
File tree
- corpus/real-world/field-dispose-via-helper
- frontend/roslyn/OwnSharp.Extractor
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
479 | 479 | | |
480 | 480 | | |
481 | 481 | | |
482 | | - | |
| 482 | + | |
| 483 | + | |
483 | 484 | | |
484 | 485 | | |
485 | 486 | | |
| |||
488 | 489 | | |
489 | 490 | | |
490 | 491 | | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
495 | 497 | | |
496 | | - | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
497 | 501 | | |
498 | 502 | | |
499 | 503 | | |
| |||
506 | 510 | | |
507 | 511 | | |
508 | 512 | | |
509 | | - | |
| 513 | + | |
510 | 514 | | |
511 | 515 | | |
512 | 516 | | |
| |||
528 | 532 | | |
529 | 533 | | |
530 | 534 | | |
531 | | - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
532 | 542 | | |
533 | 543 | | |
534 | 544 | | |
| |||
2582 | 2592 | | |
2583 | 2593 | | |
2584 | 2594 | | |
2585 | | - | |
| 2595 | + | |
| 2596 | + | |
2586 | 2597 | | |
2587 | 2598 | | |
2588 | 2599 | | |
| |||
3296 | 3307 | | |
3297 | 3308 | | |
3298 | 3309 | | |
3299 | | - | |
| 3310 | + | |
3300 | 3311 | | |
3301 | 3312 | | |
3302 | 3313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
265 | 268 | | |
266 | 269 | | |
267 | | - | |
| 270 | + | |
268 | 271 | | |
269 | 272 | | |
270 | 273 | | |
| |||
769 | 772 | | |
770 | 773 | | |
771 | 774 | | |
772 | | - | |
773 | | - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
774 | 778 | | |
775 | 779 | | |
776 | | - | |
| 780 | + | |
| 781 | + | |
777 | 782 | | |
| 783 | + | |
| 784 | + | |
778 | 785 | | |
779 | | - | |
| 786 | + | |
780 | 787 | | |
781 | 788 | | |
782 | 789 | | |
| |||
0 commit comments