Fix csapi query filter mismatches and missing headers in cscoco - #141
Open
ujjwx1 wants to merge 3 commits into
Open
Fix csapi query filter mismatches and missing headers in cscoco#141ujjwx1 wants to merge 3 commits into
ujjwx1 wants to merge 3 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.hwhen analyzing a project.cscocoonly includedcsmake-pre-defs.h, which deliberately skips the compiler's real built-in macros and system include paths. It now also includeshost-defs.handhost-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.