Configure Codacy/cppcheck to suppress missing includes and add bounded read helpers#77
Merged
NathanNeurotic merged 8 commits intoJan 7, 2026
Conversation
Codacy's Analysis Summary0 new issue (≤ 0 issue) Review Pull Request in Codacy →
|
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.
Motivation
missingInclude/missingIncludeSystemissues because PS2SDK headers are not available in the analysis environment, and the repo should not remove real includes to silence the warnings.read()usages and avoid buffer overreads.rm -rfon unsafe TARGET values) surfaced during edits.Description
/.codacy.ymlthat tells thecppcheckengine to suppressmissingIncludeSystemandmissingIncludewarnings so analysis stops reporting false positives for PS2SDK/system headers.scripts/cppcheck.shto pass a suppressions list (cppcheck-suppressions.txt) and the--suppress=missingIncludeSystem/--suppress=missingIncludeflags for local/CI parity with Codacy.include/util_safeio.handsrc/util_safeio.c(safe_read_once_nt,safe_read_fully,safe_read_fully_nt) and replaced ad-hocread()usages across multiple sources (src/*) to follow CWE-120/CWE-20 guidance, and addedutil_safeio.oto theMakefile.debug_vprintf_safeininclude/debugprintf.hand added an explicitTARGETguard plus null-check inmk_kelf.shto prevent unsafe removals.Testing
scripts/cppcheck.shscript was updated to include the suppressions list and suppress flags for local/CI parity, butcppcheckwas not executed as part of this PR verification.Codex Task