Skip to content

Fix #14893 recheck removes unselected files results - #8699

Merged
wjakobsson merged 12 commits into
cppcheck-opensource:mainfrom
wjakobsson:fixrecheckingui
Oct 23, 2026
Merged

wjakobsson merged 12 commits into
cppcheck-opensource:mainfrom
wjakobsson:fixrecheckingui

Conversation

@wjakobsson

@wjakobsson wjakobsson commented Jul 6, 2026 •

Copy link
Copy Markdown
Collaborator

Generated project, 305 files, ~131k results, with build dir.

main this PR this PR + #8957
Analyze project ~1:56 ~1:26 ~1:24
Recheck one file ~3 s ~1:36 ~15 s
Results after recheck 48 (others removed) 131,447 131,447

On main the recheck is fast because it only analyzes the selected files and removes the results of all the other files.
With this PR alone, the first recheck after full analysis reanalyzes almost every file because the hash depends on include order (https://trac.cppcheck.net/ticket/15132). This is fixed in PR #8957, so both should be merged.

This PR also replaces the QStringList used for detecting duplicate results with QSet. Each new result was compared against all earlier ones on the GUI thread, which made the GUI lag a lot for me. Now it's responsive on heavier projects with many warnings, and the single threaded phase at the end of a full analysis went from ~23s to ~2s.

@wjakobsson wjakobsson changed the title Fix: Keep other files results when doing recheck in gui Fix: Keep other files results when doing recheck in gui and update paths project open Jul 6, 2026
@wjakobsson wjakobsson changed the title Fix: Keep other files results when doing recheck in gui and update paths project open Fix #14893 recheck removes unselected files results Jul 6, 2026
Comment thread lib/analyzerinfo.cpp Fixed
Comment thread lib/analyzerinfo.cpp Fixed
@wjakobsson
wjakobsson force-pushed the fixrecheckingui branch 5 times, most recently from c11bcc4 to 7bb6d4a Compare July 16, 2026 12:37
Comment thread lib/errorlogger.cpp Fixed
@wjakobsson
wjakobsson force-pushed the fixrecheckingui branch 2 times, most recently from 183a3c5 to 4923b63 Compare September 1, 2026 13:06
@wjakobsson
wjakobsson force-pushed the fixrecheckingui branch 2 times, most recently from 02924a2 to 8f12219 Compare September 11, 2026 12:10
@wjakobsson
wjakobsson marked this pull request as ready for review October 23, 2026 10:55
@wjakobsson
wjakobsson merged commit bb94cbb into cppcheck-opensource:main Oct 23, 2026
71 checks passed
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.

3 participants