Skip to content

show <file> can return stale findings after a fresh scan #592

@Jerome2123

Description

@Jerome2123

Summary

desloppify show <file> can return stale findings even after a fresh desloppify scan --path . updates the detector counts and rewrites query.json.

Version

  • desloppify 0.9.14

Minimal repro

  1. Run desloppify scan --path . in a TypeScript repo.
  2. Remove an actually-unused import and a state-sync anti-pattern from a file. In my repro file, apps/web/src/components/plan/AddDestinationModal.tsx, I removed:
    • showErrorToast from the imports
    • the useEffect(() => setIsClient(true), []) pattern
  3. Re-run desloppify scan --path ..
  4. Observe the scan summary reflects the change:
    • Unused (tsc)... 133 -> 132
    • react: 5 state sync anti-patterns -> 4
  5. Run desloppify show apps/web/src/components/plan/AddDestinationModal.tsx.

Actual

show still reports the deleted findings for that file:

  • Unused imports: showErrorToast
  • State sync anti-pattern: useEffect only calls setIsClient

It also still points at the old line/issue ids even though the current file content no longer contains either symbol.

Expected

After a successful fresh scan, desloppify show <file> should reflect the current scan state for that file and should not continue returning findings that were removed from the source tree.

Notes

  • desloppify scan --path . printed ? query.json updated on the successful rerun.
  • The stale results were reproducible immediately after the rerun, not after a long-lived shell session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions