Skip to content

feat: stop scanning and keep partial results - #606

Open
ShivamB25 wants to merge 2 commits into
dundee:masterfrom
ShivamB25:feat/stop-scan-results
Open

feat: stop scanning and keep partial results#606
ShivamB25 wants to merge 2 commits into
dundee:masterfrom
ShivamB25:feat/stop-scan-results

Conversation

@ShivamB25

Copy link
Copy Markdown
Contributor

Summary

  • make Ctrl+C during an interactive scan stop scheduling new work instead of quitting
  • keep the partial directory tree and transition directly to navigable results
  • preserve point-in-time preview safety while analyzers are still mutating the live tree
  • apply cooperative cancellation consistently to parallel, stable, sequential, stored, SQLite, and top-directory analyzers
  • document the Ctrl+C behavior

Behavior

  • first Ctrl+C during a scan requests cancellation and shows a stopping state
  • in-flight filesystem operations finish safely; no new recursive work is scheduled
  • the resulting partial tree remains available for navigation
  • later Ctrl+C follows the normal quit path
  • cancellation state resets before a subsequent scan

Verification

  • go vet ./...
  • go test ./...
  • go test -race ./pkg/analyze ./tui
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.2 run ./...
  • interactive smoke: scan /, send SIGINT while active, observe Stopping scan and keeping results..., then reach a populated results screen

Closes #150

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.93%. Comparing base (fe605ec) to head (9c4e60a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #606      +/-   ##
==========================================
+ Coverage   85.89%   86.93%   +1.04%     
==========================================
  Files          55       55              
  Lines        6329     6521     +192     
==========================================
+ Hits         5436     5669     +233     
+ Misses        689      657      -32     
+ Partials      204      195       -9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ShivamB25
ShivamB25 force-pushed the feat/stop-scan-results branch 2 times, most recently from 01a49b2 to fa6b21d Compare July 17, 2026 18:39
@ShivamB25
ShivamB25 force-pushed the feat/stop-scan-results branch from fa6b21d to cd458e9 Compare July 17, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow stopping scanning while preserving results

1 participant