Commit aba5ad8
Report LuceneDev4002 at the call site instead of the target method
Reporting on the target method declaration produced a non-local
diagnostic — the analyzer was visiting an InvocationExpressionSyntax
but raising the diagnostic on a syntax tree it had not visited. MSBuild
ran a full compilation and surfaced the warning, but the IDE's per-file
live analysis filtered it out, so the warning never appeared in the
editor.
Move the report to the DoesStackTraceContainMethod invocation. The
diagnostic is now local, shows up in the IDE, and opens the door to a
code fix at the call site. The message names the qualified target
(e.g. 'Target.Merge') so it remains clear which method needs the
attribute. Test span updated accordingly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0c6c007 commit aba5ad8
3 files changed
Lines changed: 15 additions & 5 deletions
File tree
- src/Lucene.Net.CodeAnalysis.Dev
- LuceneDev4xxx
- tests/Lucene.Net.CodeAnalysis.Dev.Tests/LuceneDev4xxx
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
102 | 108 | | |
103 | 109 | | |
104 | 110 | | |
| |||
120 | 126 | | |
121 | 127 | | |
122 | 128 | | |
123 | | - | |
124 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
125 | 132 | | |
126 | 133 | | |
127 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
| 439 | + | |
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | | - | |
70 | | - | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
0 commit comments