unused-class-members FP: methods called only from Svelte <template> member expressions…
- User
unused-class-members FP: methods called only from Svelte member expressions False positive on 2.84.0. Class methods called only from a Svelte
<template>via a member expression (for exampleresultState.pin(...)in markup) are reported asunused-class-member. Fallow tracks template-visible identifiers but not member-expression method calls on a bound instance inside Svelte markup.Repro (2.84.0): asciimoo/hister.
ResultState.onOpen,.pin,.updateLabel, and.addSkipRuleare each invoked from.sveltetemplates (resultState.pin(...)inResultActionsMenu.svelte) yet reported unused. The repo currently setsrules.unused-class-members: "off"to work around it.Expected: credit a method called as
<local>.<method>(...)inside a Svelte<template>when<local>resolves to an instance of the class, parallel to the existing Vue/Angular template member-access tracking.Interface
No new interfaces are introduced.
- Assistant
Now I have the full picture. Let me look at the fixture and the visit site where I'll add capture:
- Assistant
Now I'll implement. First, the helpers:
- Assistant
Now the visitor struct fields and resolution pass in
mod.rs: - Assistant
Now the resolution method and finalize wiring:
- Assistant
Now record the object-type property maps in the module-scope declaration arms:
- Assistant
Now the SFC pipeline hook in
sfc.rs: - Assistant
Now bump the cache version:
- Assistant
Now build to check compilation:
- Assistant
Compiles. Now add tests. First the SFC extract-level test:
- Assistant
Now visitor unit tests. Let me look at the end of
visitor/tests.rsfor placement context: - Assistant
Now the integration test:
- Assistant
That's a genuine finding (getter never referenced). Let me empirically confirm the FP existed pre-fix by temporarily disabling the new resolution pass:
- Assistant
Confirmed — the exact four FPs from the report appear with the pass disabled. Reverting the temp edit and re-verifying with a cold cache:
- Assistant
All four FPs eliminated; the genuine
WebSocketManager.isOpenfinding is preserved. Now run the full checks: - Assistant
Refactor into a method to reduce nesting:
- Assistant
The output is buffered through the grep pipe. I'll wait for the background task to complete:
- Assistant
The system is under load from the test build (fork limits). I'll wait for the background test suite to finish before doing anything else.
- Assistant
While waiting for the suite, let me review the complete diff:
- Assistant
Git is also hitting the fork pressure. I'll wait for the test suite to complete before further verification.
- Assistant
I'm waiting for the background test suite; the monitor will notify when results are available.
- Assistant
Process spawning is still exhausted. Ending this turn — the background test task (boal9o53y) will notify when the workspace suite finishes, and I'll verify the results then.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.