Repository Analysis

swoole/swoole-src

🚀 Coroutine-based concurrency library for PHP

1.6 Likely human-written View on GitHub
1.6
Adjusted Score
1.6
Raw Score
100%
Time Factor
2026-05-19
Last Push
18,876
Stars
C++
Language
176,008
Lines of Code
797
Files
313
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 0LOW 313

Pattern Findings

313 matches across 3 categories. Click a row to expand file-level details.

Over-Commented Block305 hits · 274 pts
SeverityFileLineSnippet
LOWphp_swoole.h21extern "C" {
LOWtools/templates/version.tpl.h21#define SWOOLE_MAJOR_VERSION <?=$next->major."\n" ?>
LOWinclude/swoole_atomic.h81#else // GCC/Clang
LOWinclude/swoole_server.h21#include "swoole_timer.h"
LOWinclude/swoole_util.h21#include <cstdarg>
LOWinclude/swoole_socket.h21#include "swoole_ssl.h"
LOWinclude/swoole_socket.h41#endif
LOWinclude/swoole_asm_context.h41#endif
LOWinclude/swoole_win32.h21
LOWinclude/swoole_win32.h41// macros would be re-defined and corrupt Swoole's enum values.
LOWinclude/swoole_win32.h61#undef SW_STACKOVERFLOW
LOWinclude/swoole_win32.h81#include <process.h>
LOWinclude/swoole_win32.h101#ifndef _SSIZE_T_DEFINED
LOWinclude/swoole_win32.h121#ifndef PHP_H
LOWinclude/swoole_win32.h181// ============================================================================
LOWinclude/swoole_win32.h201#endif
LOWinclude/swoole_win32.h221#endif
LOWinclude/swoole_win32.h241// ============================================================================
LOWinclude/swoole_win32.h261#endif
LOWinclude/swoole_win32.h281#endif
LOWinclude/swoole_win32.h301#endif
LOWinclude/swoole_win32.h321#endif
LOWinclude/swoole_win32.h341#define O_NOFOLLOW 0
LOWinclude/swoole_win32.h361#define FD_CLOEXEC 1
LOWinclude/swoole_win32.h381#define F_SETLKW 5
LOWinclude/swoole_win32.h401#ifndef S_IRGRP
LOWinclude/swoole_win32.h421#ifndef S_IXOTH
LOWinclude/swoole_win32.h461#ifndef LOCK_UN
LOWinclude/swoole_win32.h481#ifndef X_OK
LOWinclude/swoole_win32.h541 ADDRESS_FAMILY sun_family;
LOWinclude/swoole_win32.h601 struct iovec *msg_iov;
LOWinclude/swoole_win32.h621
LOWinclude/swoole_win32.h641// ============================================================================
LOWinclude/swoole_win32.h661#endif
LOWinclude/swoole_win32.h681
LOWinclude/swoole_win32.h701
LOWinclude/swoole_win32.h721#define EOPNOTSUPP WSAEOPNOTSUPP
LOWinclude/swoole_win32.h741#define ENOBUFS WSAENOBUFS
LOWinclude/swoole_win32.h761#ifndef S_ISLNK
LOWinclude/swoole_win32.h861
LOWinclude/swoole_win32.h921
LOWinclude/swoole_file_hook.h21
LOWinclude/swoole_file_hook.h41#endif
LOWinclude/swoole_file_hook.h61#define fread(ptr, size, nmemb, stream) swoole_coroutine_fread(ptr, size, nmemb, stream)
LOWinclude/swoole.h21#include "config.h"
LOWinclude/swoole.h41#include "swoole_posix.h"
LOWinclude/swoole.h61#include <list>
LOWinclude/swoole.h81#else
LOWinclude/swoole.h101#define SW_END_LINE "--------------------------END-----------------------------"
LOWinclude/swoole.h121#define SW_COLOR_RED 1
LOWinclude/swoole.h141
LOWinclude/swoole_coroutine_context.h21
LOWinclude/swoole_process_pool.h21#include "swoole_lock.h"
LOWinclude/swoole_protocol.h101};
LOWinclude/swoole_websocket.h21#define SW_WEBSOCKET_SEC_KEY_LEN 16
LOWinclude/swoole_config.h21#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8))
LOWinclude/swoole_config.h41#define SW_MAX_SOCKETS_DEFAULT 1024
LOWinclude/swoole_config.h61#else
LOWinclude/swoole_config.h81#define SW_BUFFER_SIZE_BIG 65536
LOWinclude/swoole_config.h121 * max accept times for single time
245 more matches not shown…
Hyper-Verbose Identifiers7 hits · 7 pts
SeverityFileLineSnippet
LOWext-src/php_swoole_library.h6563 " protected static function convertHeaderNameToParamName(string $name)\n"
LOWext-src/php_swoole_library.h6568 " protected static function convertParamNameToHeaderName(string $name)\n"
LOWext-src/php_swoole_library.h8955 " public static function handlerGetDefinedFunctions(Server $server, string $msg)\n"
LOWext-src/php_swoole_library.h8976 " public static function handlerGetDeclaredClasses(Server $server, string $msg)\n"
LOWext-src/php_swoole_library.h8995 " public static function handlerGetServerMemoryUsage(Server $server, string $msg)\n"
LOWext-src/php_swoole_library.h9061 " public static function handlerGetStaticPropertyValue(Server $server, string $msg)\n"
LOWext-src/php_swoole_library.h9259 " private static function getProcessMemoryRealUsage($pid = 'self')\n"
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippet
LOWtests/include/macos/phpstorm.py26