Repository Analysis

shadps4-emu/shadPS4

PlayStation 4 emulator for Windows, Linux, macOS and FreeBSD written in C++

1.8 Likely human-written View on GitHub
1.8
Adjusted Score
1.8
Raw Score
100%
Time Factor
2026-05-29
Last Push
31,211
Stars
C++
Language
234,353
Lines of Code
852
Files
429
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 1MEDIUM 12LOW 416

Pattern Findings

429 matches across 9 categories. Click a row to expand file-level details.

Over-Commented Block408 hits · 376 pts
SeverityFileLineSnippet
LOWCONTRIBUTING.md41// then, library includes
LOWexternals/stb/stb_image.h121
LOWexternals/stb/stb_image.h141// unsigned char *data = stbi_load(filename, &x, &y, &n, 0);
LOWexternals/stb/stb_image.h161// *channels_in_file otherwise. If desired_channels is non-zero,
LOWexternals/stb/stb_image.h181// more user-friendly ones.
LOWexternals/stb/stb_image.h201// Additionally, stb_image will reject image files that have any of their
LOWexternals/stb/stb_image.h221// ===========================================================================
LOWexternals/stb/stb_image.h241// - Small source code footprint ("easy to maintain")
LOWexternals/stb/stb_image.h261// supported by the compiler. For ARM Neon support, you must explicitly
LOWexternals/stb/stb_image.h281// stb_image supports loading HDR images in general, and currently the Radiance
LOWexternals/stb/stb_image.h301//
LOWexternals/stb/stb_image.h321// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per
LOWexternals/stb/stb_image.h341// STBI_NO_PIC
LOWexternals/stb/stb_image.h361// - If you define STBI_MAX_DIMENSIONS, stb_image will reject images greater
LOWexternals/stb/stb_image.h541
LOWexternals/stb/stb_image.h561 #endif
LOWexternals/stb/stb_image.h581
LOWexternals/stb/stb_image.h601#ifndef STBI_ASSERT
LOWexternals/stb/stb_image.h621#endif
LOWexternals/stb/stb_image.h661#endif
LOWexternals/stb/stb_image.h681#ifndef STBI_MALLOC
LOWexternals/stb/stb_image.h701// but previous attempts to provide the SSE2 functions with runtime
LOWexternals/stb/stb_image.h761#else // assume GCC-style if not VC++
LOWexternals/stb/stb_image.h781
LOWexternals/stb/stb_image.h981 return 0;
LOWexternals/stb/stb_image.h1081 if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX/b; // product is positive, so similar to mul2sizes_valid
LOWexternals/stb/stb_image.h1141 ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order
LOWexternals/stb/stb_image.h1721#ifndef STBI_NO_BMP
LOWexternals/stb/stb_image.h1921// - still fast on x86 (copying globals into locals doesn't help x86)
LOWexternals/stb/stb_image.h2901#undef dct_trn8_32
LOWexternals/stb/stb_image.h4081// public domain zlib decode v0.2 Sean Barrett 2006-11-18
LOWexternals/stb/stb_image.h6161 if (bitdepth != 8 && bitdepth != 16)
LOWexternals/stb/stb_image.h7481// *************************************************************************************************
LOWexternals/renderdoc/renderdoc_app.h21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
LOWexternals/renderdoc/renderdoc_app.h41#define RENDERDOC_CC
LOWexternals/renderdoc/renderdoc_app.h61
LOWexternals/renderdoc/renderdoc_app.h81 // 1 - The application can enable or disable vsync at will
LOWexternals/renderdoc/renderdoc_app.h101 eRENDERDOC_Option_DebugDeviceMode = 2, // deprecated name of this enum
LOWexternals/renderdoc/renderdoc_app.h121
LOWexternals/renderdoc/renderdoc_app.h141 // 0 - No verification is performed, and overwriting bounds may cause crashes or corruption in
LOWexternals/renderdoc/renderdoc_app.h161 //
LOWexternals/renderdoc/renderdoc_app.h181 // 0 - unless a read is detected, initial contents will not be saved and will
LOWexternals/renderdoc/renderdoc_app.h201 // Mute API debugging output when the API validation mode option is enabled
LOWexternals/renderdoc/renderdoc_app.h221 // This will cause increased disk space use (which may cause a capture to fail if disk space is
LOWexternals/renderdoc/renderdoc_app.h381// This function will unload RenderDoc's crash handler.
LOWexternals/renderdoc/renderdoc_app.h401// SetCaptureFilePathTemplate("my_captures/example");
LOWexternals/renderdoc/renderdoc_app.h421// pathlength will be written with the length in bytes of the filename string
LOWexternals/renderdoc/renderdoc_app.h441// Any existing comments will be overwritten.
LOWexternals/renderdoc/renderdoc_app.h461//
LOWexternals/renderdoc/renderdoc_app.h481// Capturing functions
LOWexternals/renderdoc/renderdoc_app.h501#define RENDERDOC_DEVICEPOINTER_FROM_VKINSTANCE(inst) (*((void **)(inst)))
LOWexternals/renderdoc/renderdoc_app.h521//
LOWexternals/renderdoc/renderdoc_app.h541//
LOWexternals/renderdoc/renderdoc_app.h561typedef void(RENDERDOC_CC *pRENDERDOC_SetCaptureTitle)(const char *title);
LOWexternals/renderdoc/renderdoc_app.h601// 1.1.1 - Refactor: Renamed remote access to target control (to better disambiguate from remote
LOWexternals/renderdoc/renderdoc_app.h721//
LOWtests/test_emulator_settings.cpp1// SPDX-FileCopyrightText: Copyright 2026 shadPS4 Emulator Project
LOWtests/network/test_http_uri.cpp1// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
LOWtests/network/test_http_parse_response_header.cpp1// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
LOWtests/network/test_http_status_line.cpp1// SPDX-FileCopyrightText: Copyright 2024-2026 shadPS4 Emulator Project
348 more matches not shown…
Decorative Section Separators11 hits · 33 pts
SeverityFileLineSnippet
MEDIUMtests/CMakeLists.txt203# ===========================================================================
MEDIUMtests/CMakeLists.txt205# ===========================================================================
MEDIUMsrc/core/emulator_settings.cpp20// ── Singleton storage ─────────────────────────────────────────────────
MEDIUMsrc/core/emulator_settings.cpp24// ── nlohmann helpers for std::filesystem::path ───────────────────────
MEDIUMsrc/core/emulator_settings.cpp88// ── Helpers ───────────────────────────────────────────────────────────
MEDIUMsrc/core/emulator_settings.cpp100// ── Singleton ────────────────────────────────────────────────────────
MEDIUMsrc/core/emulator_settings.cpp226// ── Game-specific override management ────────────────────────────────
MEDIUMsrc/core/emulator_settings.cpp312 // ── Global config.json ─────────────────────────────────────
MEDIUMsrc/core/emulator_settings.cpp359// ── Load ──────────────────────────────────────────────────────────────
MEDIUMsrc/core/emulator_settings.cpp364 // ── Global config ──────────────────────────────────────────
MEDIUMsrc/core/emulator_settings.cpp433 // ── Per-game override file ─────────────────────────────────
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippet
HIGHsrc/video_core/texture_cache/texture_cache.cpp233 // In this case we need to convert Rx float to a Dx[S8] as requested
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippet
LOWsrc/core/file_format/trp.cpp13 // Step 1: Encrypt NPcommID
LOWsrc/core/file_format/trp.cpp20 // Step 2: Decrypt EFSM
LOWsrc/core/libraries/sysmodule/sysmodule_internal.cpp190 // Now we need to check if the requested library is allowed to LLE.
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMsrc/core/memory.h207 // If size is zero and boundary checks succeed, then skip more robust checking
Unused Imports2 hits · 2 pts
SeverityFileLineSnippet
LOWscripts/ps4_names2stubs.py7
LOWscripts/ps4_names2stubs.py7
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOW.github/workflows/build.yml408 # Check if release already exists and get ID
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWsrc/shader_recompiler/ir/ir_emitter.cpp2145// Example usage:
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippet
LOWtests/network/test_http_uri.cpp224 src.path = const_cast<char*>("user@example.com");