Repository Analysis

libsdl-org/SDL

Simple DirectMedia Layer

2.3 Likely human-written View on GitHub
2.3
Adjusted Score
2.3
Raw Score
100%
Time Factor
2026-05-30
Last Push
15,768
Stars
C
Language
811,908
Lines of Code
1766
Files
2311
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 16LOW 2295

Pattern Findings

2311 matches across 11 categories. Click a row to expand file-level details.

Over-Commented Block2224 hits · 1725 pts
SeverityFileLineSnippet
LOWCMakeLists.txt2601 "${SDL3_SOURCE_DIR}/src/joystick/darwin/*.h"
LOW…ject/app/src/main/java/org/libsdl/app/SDLActivity.java1501 }
LOWtest/testoverlay.c21#include <SDL3/SDL_main.h>
LOWtest/gamepadutils.c21#include "gamepad_face_sony.h"
LOWtest/testvulkan.c21 SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "No Vulkan support on this system");
LOWtest/testgpu_spinning_cube.c21 */
LOWtest/testffmpeg.c21#include <libavcodec/avcodec.h>
LOWtest/testffmpeg.c41#ifndef DRM_FORMAT_GR88
LOWtest/testautomation_blit.c1/**
LOWtest/testcontroller.c21#ifdef SDL_PLATFORM_EMSCRIPTEN
LOWtest/testnative.c21
LOWtest/testfile.c21#include <stdlib.h>
LOWtest/testmouse.c21#include <stdlib.h> /* exit() */
LOWtest/testautomation_render.c1/**
LOWtest/gamepadutils.h61#define PRESSED_TEXTURE_MOD 175, 238, 238
LOWtest/testevdev.c21#endif
LOWtest/testnative.h41#ifdef SDL_VIDEO_DRIVER_X11
LOWtest/testime.c21#include <SDL3/SDL.h>
LOWtest/testime.c101#define UNIFONT_REPLACEMENT 0xFFFD
LOWtest/win32/sdlprocdump.c1#ifndef WIN32_LEAN_AND_MEAN
LOWtest/win32/sdlprocdump.c21#define EXCEPTION_STACK_INVALID 0x8
LOWtest/win32/sdlprocdump.c41
LOWinclude/SDL3/SDL_opengles2_gl2ext.h41#define GL_COLORDODGE_KHR 0x9299
LOWinclude/SDL3/SDL_opengles2_gl2ext.h61
LOWinclude/SDL3/SDL_opengles2_gl2ext.h81#define GL_DEBUG_SOURCE_OTHER_KHR 0x824B
LOWinclude/SDL3/SDL_opengles2_gl2ext.h101#define GL_MAX_LABEL_LENGTH_KHR 0x82E8
LOWinclude/SDL3/SDL_opengles2_gl2ext.h141#endif /* GL_KHR_no_error */
LOWinclude/SDL3/SDL_opengles2_gl2ext.h181#ifndef GL_KHR_shader_subgroup
LOWinclude/SDL3/SDL_opengles2_gl2ext.h201#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
LOWinclude/SDL3/SDL_opengles2_gl2ext.h221#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
LOWinclude/SDL3/SDL_opengles2_gl2ext.h241typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
LOWinclude/SDL3/SDL_opengles2_gl2ext.h261#define GL_OES_compressed_ETC1_RGB8_sub_texture 1
LOWinclude/SDL3/SDL_opengles2_gl2ext.h281#endif /* GL_OES_compressed_paletted_texture */
LOWinclude/SDL3/SDL_opengles2_gl2ext.h341#endif /* GL_OES_draw_elements_base_vertex */
LOWinclude/SDL3/SDL_opengles2_gl2ext.h361#define GL_GEOMETRY_SHADER_OES 0x8DD9
LOWinclude/SDL3/SDL_opengles2_gl2ext.h381#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_OES 0x92CF
LOWinclude/SDL3/SDL_opengles2_gl2ext.h401#define GL_OES_get_program_binary 1
LOWinclude/SDL3/SDL_opengles2_gl2ext.h421#define GL_BUFFER_MAPPED_OES 0x88BC
LOWinclude/SDL3/SDL_opengles2_gl2ext.h441#define GL_OES_primitive_bounding_box 1
LOWinclude/SDL3/SDL_opengles2_gl2ext.h461#define GL_RGB10_EXT 0x8052
LOWinclude/SDL3/SDL_opengles2_gl2ext.h481#endif /* GL_OES_sample_variables */
LOWinclude/SDL3/SDL_opengles2_gl2ext.h501#endif /* GL_OES_standard_derivatives */
LOWinclude/SDL3/SDL_opengles2_gl2ext.h521
LOWinclude/SDL3/SDL_opengles2_gl2ext.h541#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS_OES 0x8E83
LOWinclude/SDL3/SDL_opengles2_gl2ext.h561#define GL_REFERENCED_BY_TESS_CONTROL_SHADER_OES 0x9307
LOWinclude/SDL3/SDL_opengles2_gl2ext.h621#ifndef GL_OES_texture_buffer
LOWinclude/SDL3/SDL_opengles2_gl2ext.h641GL_APICALL void GL_APIENTRY glTexBufferRangeOES (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, G
LOWinclude/SDL3/SDL_opengles2_gl2ext.h661#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4
LOWinclude/SDL3/SDL_opengles2_gl2ext.h681
LOWinclude/SDL3/SDL_opengles2_gl2ext.h701#endif /* GL_OES_texture_npot */
LOWinclude/SDL3/SDL_opengles2_gl2ext.h721
LOWinclude/SDL3/SDL_opengles2_gl2ext.h741typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
LOWinclude/SDL3/SDL_opengles2_gl2ext.h781GL_APICALL void GL_APIENTRY glScissorIndexedvOES (GLuint index, const GLint *v);
LOWinclude/SDL3/SDL_opengles2_gl2ext.h801#ifndef GL_AMD_framebuffer_multisample_advanced
LOWinclude/SDL3/SDL_opengles2_gl2ext.h861#ifndef GL_ANGLE_depth_texture
LOWinclude/SDL3/SDL_opengles2_gl2ext.h901#ifndef GL_ANGLE_pack_reverse_row_order
LOWinclude/SDL3/SDL_opengles2_gl2ext.h921#ifndef GL_ANGLE_texture_usage
LOWinclude/SDL3/SDL_opengles2_gl2ext.h941#define GL_CLIP_DISTANCE2_APPLE 0x3002
LOWinclude/SDL3/SDL_opengles2_gl2ext.h961#ifndef GL_APPLE_framebuffer_multisample
LOWinclude/SDL3/SDL_opengles2_gl2ext.h981#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
2164 more matches not shown…
AI Slop Vocabulary12 hits · 30 pts
SeverityFileLineSnippet
MEDIUM…oject/app/src/main/java/org/libsdl/app/SDLSurface.java278 // if we are. We'll leverage our existing mouse motion listener
LOWinclude/SDL3/SDL_main_impl.h134 #else /* platforms that use a standard main() and just call SDL_RunApp(), like iOS and 3DS */
MEDIUMexamples/template.html266 // application robust, you may want to override this behavior before shipping!
LOWbuild-scripts/wikiheaders.pl356 # So something like "just call `SDL_Whatever`" will become
LOWbuild-scripts/wikiheaders.pl357 # "just call [`SDL_Whatever`](SDL_Whatever)", but
LOWbuild-scripts/wikiheaders.pl358 # "just call `SDL_Whatever(7)`" will not. It's just the safest
MEDIUMsrc/video/SDL_blit_1.c540 case SDL_COPY_COLORKEY | SDL_COPY_BLEND: // this is not super-robust but handles a specific case we found sdl12-com
MEDIUMsrc/video/windows/SDL_windowsvideo.h94// More-robust display information in Vista...
LOWsrc/hidapi/testgui/copy_to_bundle.sh84# necessary. If ../libtool not available, just use cp to do the copy, but
MEDIUMsrc/joystick/SDL_gamepad.c1476 // We'll pick up a robust mapping in VIRTUAL_JoystickGetGamepadMapping
MEDIUMsrc/joystick/hidapi/steam/controller_structs.h157// Triton and derivatives utilize output reports for haptic commands. This is a
MEDIUMsrc/events/SDL_pen_c.h62// Note that name and info are copied but currently unused; this is placeholder for a potentially more robust API later.
Deep Nesting22 hits · 22 pts
SeverityFileLineSnippet
LOWVisualC/examples/generate.py44
LOW.github/workflows/create-test-plan.py921
LOWbuild-scripts/rename_types.py37
LOWbuild-scripts/rename_macros.py62
LOWbuild-scripts/create-android-project.py118
LOWbuild-scripts/rename_headers.py31
LOWbuild-scripts/build-release.py360
LOWbuild-scripts/build-release.py444
LOWbuild-scripts/build-release.py478
LOWbuild-scripts/build-release.py715
LOWbuild-scripts/build-release.py996
LOWbuild-scripts/build-release.py1218
LOWbuild-scripts/rename_symbols.py48
LOWbuild-scripts/rename_symbols.py85
LOWbuild-scripts/rename_api.py126
LOWbuild-scripts/rename_api.py192
LOWbuild-scripts/check_android_jni.py66
LOWbuild-scripts/check_android_jni.py101
LOWbuild-scripts/check_android_jni.py134
LOWbuild-scripts/check_stdlib_usage.py154
LOWsrc/dynapi/gendynapi.py77
LOWsrc/dynapi/gendynapi.py371
Excessive Try-Catch Wrapping13 hits · 17 pts
SeverityFileLineSnippet
LOWbuild-scripts/rename_types.py47 except Exception as err:
LOWbuild-scripts/rename_types.py75 except Exception as e:
MEDIUMbuild-scripts/rename_types.py37def replace_symbols_in_file(file, regex, replacements):
LOWbuild-scripts/rename_macros.py74 except Exception as err:
LOWbuild-scripts/rename_macros.py101 except Exception as e:
MEDIUMbuild-scripts/rename_macros.py62def apply_checks_in_file(file, checks):
LOWbuild-scripts/rename_headers.py43 except Exception as err:
LOWbuild-scripts/rename_headers.py70 except Exception as e:
MEDIUMbuild-scripts/rename_headers.py31def replace_headers_in_file(file, replacements):
LOWbuild-scripts/rename_symbols.py95 except Exception as err:
LOWbuild-scripts/rename_symbols.py125 except Exception as e:
MEDIUMbuild-scripts/rename_symbols.py85def replace_symbols_in_file(file, regex, replacements):
LOWbuild-scripts/rename_api.py249 except Exception as e:
Hyper-Verbose Identifiers16 hits · 12 pts
SeverityFileLineSnippet
LOWtest/emscripten/server.py13class MyHTTPRequestHandler(SimpleHTTPRequestHandler):
LOWbuild-scripts/rename_types.py34def create_regex_from_replacements(replacements):
LOWbuild-scripts/create-android-project.py87def gradle_add_prefab_and_aar(path: Path, aar: str) -> None:
LOWbuild-scripts/setup-gdk-desktop.py107 def copy_files_and_merge_into(srcdir: Path, dstdir: Path) -> None:
LOWbuild-scripts/build-release.py604 def _external_repo_path_filter(cls, path: str) -> bool:
LOWbuild-scripts/build-release.py942 def _get_prefab_module_json_text(self, library_name: typing.Optional[str], export_libraries: list[str]) -> str:
LOWbuild-scripts/build-release.py975 def _get_prefab_abi_json_text(self, abi: str, cpp: bool, shared: bool) -> str:
LOWbuild-scripts/build-release.py985 def _get_android_manifest_text(self) -> str:
LOWbuild-scripts/build-release.py1303 def _arch_platform_to_build_path(self, arch_platform: VsArchPlatformConfig) -> Path:
LOWbuild-scripts/build-release.py1306 def _arch_platform_to_install_path(self, arch_platform: VsArchPlatformConfig) -> Path:
LOWbuild-scripts/rename_symbols.py77def create_regex_from_replacements(replacements):
LOWbuild-scripts/rename_symbols.py81def create_substring_regex_from_replacements(replacements):
LOWbuild-scripts/check_android_jni.py39def java_type_to_jni_spec_internal(type_str: str) -> tuple[int, str]:
LOWbuild-scripts/check_android_jni.py66def collect_jni_bindings_from_c() -> dict[str, set[JniMethodBinding]]:
LOWbuild-scripts/check_android_jni.py101def collect_jni_bindings_from_java() -> dict[str, set[JniMethodBinding]]:
LOWsrc/dynapi/gendynapi.py365def print_check_comment_header():
Decorative Section Separators4 hits · 12 pts
SeverityFileLineSnippet
MEDIUMbuild-scripts/casefolding.txt31# ================================================================================
MEDIUMbuild-scripts/casefolding.txt33# ================================================================================
MEDIUMbuild-scripts/casefolding.txt55# =================================================================
MEDIUMbuild-scripts/casefolding.txt62# =================================================================
Unused Imports11 hits · 11 pts
SeverityFileLineSnippet
LOWtest/emscripten/driver.py8
LOWcmake/xxd.py4
LOWbuild-scripts/rename_types.py6
LOWbuild-scripts/create-release.py6
LOWbuild-scripts/setup-gdk-desktop.py4
LOWbuild-scripts/build-release.py10
LOWbuild-scripts/rename_symbols.py6
LOWbuild-scripts/rename_api.py7
LOWbuild-scripts/rename_api.py9
LOWbuild-scripts/check_stdlib_usage.py25
LOWsrc/dynapi/gendynapi.py36
Verbosity Indicators3 hits · 4 pts
SeverityFileLineSnippet
LOW…oject/app/src/main/java/org/libsdl/app/SDLSurface.java277 // We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values
LOWsrc/video/dos/SDL_dosvideo.c198 // Step 1: query the required buffer size (subfunction 0x00).
LOWsrc/video/dos/SDL_dosvideo.c210 // Step 2: save state (subfunction 0x01) into conventional memory buffer.
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippet
LOWinclude/SDL3/SDL_process.h39 * Don't forget to call SDL_DestroyProcess() to clean up, whether the process
LOWsrc/video/SDL_stb.c380 /* And don't forget to report the problem to the the sdl list too! */
LOWsrc/render/direct3d11/SDL_render_d3d11.c514 * Don't forget to declare your application's minimum required feature level in its
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMbuild-scripts/androidbuildlibs.sh23# Create the build directories
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippet
LOWbuild-scripts/check_elf_alignment.sh105 # Check if this is a critical architecture (arm64-v8a or x86_64)
LOWbuild-scripts/update-version.sh42# Set compat to major.minor.0 by default.