Skip to content

Fix csapi query filter mismatches and missing headers in cscoco - #141

Open
ujjwx1 wants to merge 3 commits into
cscout-project:gsoc-2026from
ujjwx1:gsoc-2026-csapi-fixes
Open

Fix csapi query filter mismatches and missing headers in cscoco#141
ujjwx1 wants to merge 3 commits into
cscout-project:gsoc-2026from
ujjwx1:gsoc-2026-csapi-fixes

Conversation

@ujjwx1

@ujjwx1 ujjwx1 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

csapi.py

Some of the saved query filters were missing conditions that their matching count queries already had. This caused the count returned by the counts endpoint to not match the number of rows returned by the corresponding list query.

cscoco.py

On a fresh Linux install, CScout couldn't find standard headers like stdio.h when analyzing a project. cscoco only included csmake-pre-defs.h, which deliberately skips the compiler's real built-in macros and system include paths. It now also includes host-defs.h and host-incs.h, which contain that missing information.

Testing

Verified against cJSON and curl on a fresh Linux install. Standard headers now resolve correctly, and query counts match their list results.

ujjwx1 added 3 commits August 19, 2026 02:37
The static_vars saved query was missing AND i.FUN = 0, causing
functions to appear in the variables-only panel category. The
counts query already had this condition correctly.
Several named queries in SAVED_QUERIES_FILES and SAVED_QUERIES_IDS
were missing filters that their corresponding /counts endpoints
already applied correctly, causing sidebar panel counts to mismatch
the actual items shown when expanded.
cscoco used csmake-pre-defs.h as its sole pre-defs file, but that
file deliberately omits the compiler's built-in macro definitions
and system include paths since it targets the csmake workflow where
a real compiler supplies them separately. Since cscoco has no real
compiler in the loop, this caused CScout to fail finding standard
headers on a fresh install. Now includes host-defs.h and host-incs.h
alongside csmake-pre-defs.h, matching what a fresh Linux install
needs to resolve standard headers correctly.
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.

1 participant