Repository Analysis

redis/redis

For developers, who are building real-time data-driven applications, Redis is the preferred, fastest, and most feature-rich cache, data structure server, and document and vector query engine.

1.3 Likely human-written View on GitHub
1.3
Adjusted Score
1.3
Raw Score
100%
Time Factor
2026-05-29
Last Push
74,602
Stars
C
Language
422,988
Lines of Code
1441
Files
493
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 3MEDIUM 22LOW 468

Pattern Findings

493 matches across 12 categories. Click a row to expand file-level details.

Over-Commented Block371 hits · 362 pts
SeverityFileLineSnippet
LOWutils/install_server.sh1#!/bin/sh
LOWutils/install_server.sh21# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LOWutils/install_server.sh41#
LOWutils/install_server.sh201"#!/bin/sh\n
LOWutils/install_server.sh221# Should-Stop: \$syslog \$named\n
LOWutils/install_server.sh241cat > ${TMP_FILE} <<EOT
LOWutils/redis-sha1.rb1# redis-sha1.rb - Copyright (C) 2009-Present Redis Ltd. All rights reserved.
LOWutils/hyperloglog/hll-gnuplot-graph.rb1# hll-err.rb - Copyright (C) 2014-Present Redis Ltd.
LOWdeps/jemalloc/msvc/test_threads/test_threads.cpp1// jemalloc C++ threaded test
LOWdeps/jemalloc/test/unit/arena_reset_prof.c1#include "test/jemalloc_test.h"
LOWdeps/jemalloc/test/include/test/SFMT-params2281.h41#define SL2 1
LOWdeps/jemalloc/test/include/test/SFMT-params2281.h61 #define ALTI_SL2_PERM \
LOWdeps/jemalloc/test/include/test/SFMT-params.h101
LOWdeps/jemalloc/test/include/test/SFMT-params.h121 #include "test/SFMT-params216091.h"
LOWdeps/jemalloc/test/include/test/SFMT-params1279.h41#define SL2 3
LOWdeps/jemalloc/test/include/test/SFMT-params1279.h61 #define ALTI_SL2_PERM \
LOWdeps/jemalloc/test/include/test/SFMT-params44497.h41#define SL2 3
LOWdeps/jemalloc/test/include/test/SFMT-params44497.h61 #define ALTI_SL2_PERM \
LOWdeps/jemalloc/test/include/test/test.h41#define expect_c_gt(a, b, ...) expect_cmp(char, a, b, >, <=, "c", __VA_ARGS__)
LOWdeps/jemalloc/test/include/test/test.h321#define expect_not_reached(...) verify_not_reached(false, __VA_ARGS__)
LOWdeps/jemalloc/test/include/test/test.h341
LOWdeps/jemalloc/test/include/test/SFMT-params4253.h41#define SL2 1
LOWdeps/jemalloc/test/include/test/SFMT-params4253.h61 #define ALTI_SL2_PERM \
LOWdeps/jemalloc/test/include/test/SFMT-params11213.h41#define SL2 3
LOWdeps/jemalloc/test/include/test/SFMT-params11213.h61 #define ALTI_SL2_PERM \
LOWdeps/jemalloc/test/include/test/SFMT-params86243.h41#define SL2 7
LOWdeps/jemalloc/test/include/test/SFMT-params86243.h61 #define ALTI_SL2_PERM \
LOWdeps/jemalloc/test/include/test/SFMT-params132049.h41#define SL2 1
LOWdeps/jemalloc/test/include/test/SFMT-params132049.h61 #define ALTI_SL2_PERM \
LOWdeps/jemalloc/test/include/test/SFMT-params216091.h41#define SL2 3
LOWdeps/jemalloc/test/include/test/SFMT-params216091.h61 #define ALTI_SL2_PERM \
LOWdeps/jemalloc/test/include/test/SFMT-params19937.h41#define SL2 1
LOWdeps/jemalloc/test/include/test/SFMT-params19937.h61 #define ALTI_SL2_PERM \
LOWdeps/jemalloc/test/include/test/SFMT-params607.h41#define SL2 3
LOWdeps/jemalloc/test/include/test/SFMT-params607.h61 #define ALTI_SL2_PERM \
LOWdeps/jemalloc/test/src/math.c1#define MATH_C_
LOWdeps/jemalloc/test/src/SFMT.c41 * @author Makoto Matsumoto (Hiroshima University)
LOWdeps/jemalloc/include/jemalloc/internal/rtree.h21/* Number of significant bits. */
LOWdeps/jemalloc/include/jemalloc/internal/test_hooks.h1#ifndef JEMALLOC_INTERNAL_TEST_HOOKS_H
LOWdeps/jemalloc/include/jemalloc/internal/lockedint.h21
LOWdeps/jemalloc/include/jemalloc/internal/lockedint.h41# define LOCKEDINT_MTX(mtx) NULL
LOWdeps/jemalloc/include/jemalloc/internal/tsd.h1#ifndef JEMALLOC_INTERNAL_TSD_H
LOWdeps/jemalloc/include/jemalloc/internal/tsd.h221 * Some TSD accesses can only be done in a nominal state. To enforce this, we
LOWdeps/jemalloc/include/jemalloc/internal/nstime.h1#ifndef JEMALLOC_INTERNAL_NSTIME_H
LOWdeps/jemalloc/include/jemalloc/internal/rtree_tsd.h21#define RTREE_CTX_NCACHE 16
LOW…include/jemalloc/internal/jemalloc_internal_includes.h61#include "jemalloc/internal/arena_externs.h"
LOW…include/jemalloc/internal/jemalloc_internal_includes.h81#include "jemalloc/internal/prof_inlines.h"
LOW…s/jemalloc/include/jemalloc/internal/arena_inlines_b.h1#ifndef JEMALLOC_INTERNAL_ARENA_INLINES_B_H
LOW…nclude/jemalloc/internal/jemalloc_internal_inlines_a.h1#ifndef JEMALLOC_INTERNAL_INLINES_A_H
LOW…c/include/jemalloc/internal/jemalloc_internal_macros.h1#ifndef JEMALLOC_INTERNAL_MACROS_H
LOW…c/include/jemalloc/internal/jemalloc_internal_macros.h21#define QU(q) ((uint64_t)q)
LOW…c/include/jemalloc/internal/jemalloc_internal_macros.h41# define JET_MUTABLE const
LOW…c/include/jemalloc/internal/jemalloc_internal_macros.h81
LOW…oc/include/jemalloc/internal/jemalloc_internal_decls.h1#ifndef JEMALLOC_INTERNAL_DECLS_H
LOW…oc/include/jemalloc/internal/jemalloc_internal_decls.h21# include <sys/mman.h>
LOW…oc/include/jemalloc/internal/jemalloc_internal_decls.h41# endif
LOW…oc/include/jemalloc/internal/jemalloc_internal_decls.h61#endif
LOW…oc/include/jemalloc/internal/jemalloc_internal_decls.h81# define STDERR_FILENO 2
LOWdeps/jemalloc/include/jemalloc/internal/pa.h1#ifndef JEMALLOC_INTERNAL_PA_H
LOWdeps/jemalloc/include/jemalloc/internal/malloc_io.h1#ifndef JEMALLOC_INTERNAL_MALLOC_IO_H
311 more matches not shown…
Excessive Try-Catch Wrapping46 hits · 63 pts
SeverityFileLineSnippet
LOWtools/array-bench.py155 except Exception as exc: # pragma: no cover - startup race handling
LOWtools/array-bench.py168 except Exception: # pragma: no cover - best effort diagnostics
MEDIUMtools/array-bench.py69def run(self) -> int:
LOWutils/req-res-log-validator.py220 except Exception as err:
LOWutils/req-res-log-validator.py262 except Exception as e:
MEDIUMutils/generate-command-code.py553 print("Error processing %s: %s" % (filename, err))
MEDIUMutils/generate-command-code.py575 print("Error: There are errors in the commands check, please check the above logs.")
LOWmodules/vector-sets/test.py159 except Exception as e:
LOWmodules/vector-sets/test.py193 except Exception as e:
MEDIUMmodules/vector-sets/test.py194 print(f"Error loading {file}: {e}")
MEDIUMmodules/vector-sets/test.py276 print(f"Error: {test.error_msg}")
MEDIUMmodules/vector-sets/test.py149def run(self):
LOWmodules/vector-sets/tests/vsim_limit_efsearch.py31 except Exception as e:
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py57 except Exception as e:
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py60 except Exception as e:
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py77 except Exception as e:
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py79 except Exception as e:
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py104 except Exception as e:
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py109 except Exception as e:
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py147 except Exception as e:
LOWmodules/vector-sets/tests/memory_usage.py35 except Exception as e:
LOWmodules/vector-sets/tests/vadd_cas.py29 except Exception as e:
MEDIUMmodules/vector-sets/tests/vadd_cas.py31 print(f"Error adding {name}: {e}")
LOWmodules/vector-sets/tests/debug_digest.py38 except Exception as e:
LOWmodules/vector-sets/tests/replication.py47 except Exception as e:
LOWmodules/vector-sets/tests/replication.py56 except Exception as e:
LOWmodules/vector-sets/tests/replication.py68 except Exception as e:
LOWmodules/vector-sets/tests/threading_config.py35 except Exception:
LOWmodules/vector-sets/tests/threading_config.py45 except Exception as e:
LOWmodules/vector-sets/tests/filter_int.py194 except Exception as e:
MEDIUMmodules/vector-sets/tests/filter_int.py195 print(f"Error evaluating filter expression '{filter_expr}' as '{py_expr}': {e}")
LOWmodules/vector-sets/tests/filter_int.py198 except Exception as e:
MEDIUMmodules/vector-sets/tests/filter_int.py199 print(f"Error evaluating filter expression '{filter_expr}' as '{py_expr}': {e}")
LOWmodules/vector-sets/tests/filter_int.py423 except Exception as e:
LOWmodules/vector-sets/tests/filter_int.py441 except Exception as e:
LOWmodules/vector-sets/tests/filter_int.py490 except Exception as e:
MEDIUMmodules/vector-sets/examples/cli-tool/cli.py101 print("Error: Could not connect to Redis server")
LOWmodules/vector-sets/examples/cli-tool/cli.py120 except Exception as e:
LOWmodules/vector-sets/examples/cli-tool/cli.py127 except Exception as e:
LOWmodules/vector-sets/examples/cli-tool/cli.py156 except Exception as e:
LOWmodules/vector-sets/examples/glove-100/recall.py71 except Exception as e:
MEDIUMmodules/vector-sets/examples/glove-100/recall.py72 print(f"Error processing query {i}: {str(e)}")
LOWmodules/vector-sets/examples/glove-100/insert.py48 except Exception as e:
MEDIUMmodules/vector-sets/examples/glove-100/insert.py49 print(f"Error processing vector {current_index}: {str(e)}")
LOWmodules/vector-sets/examples/movies/insert.py52 except Exception as e:
MEDIUMmodules/vector-sets/examples/movies/insert.py53 print(f"Error processing {movie['title']}: {str(e)}")
Self-Referential Comments7 hits · 24 pts
SeverityFileLineSnippet
MEDIUMmodules/vector-sets/tests/filter_expr.py8 # Create a small set of vectors with different attributes
MEDIUMmodules/vector-sets/tests/dimension_validation.py17 # Create the initial vector and set with projection
MEDIUMmodules/vector-sets/tests/filter_int.py345 # Create a larger dataset for testing
MEDIUMmodules/vector-sets/tests/filter_int.py519 # Create a dataset where we control the exact selectivity
MEDIUMmodules/vector-sets/tests/filter_int.py528 # Create a query vector
MEDIUMmodules/vector-sets/tests/filter_int.py618 # Create a selective filter that matches ~2% of items
MEDIUMmodules/vector-sets/tests/dimension_max_limit.py86 # Create a small index, then issue a VSIM with an over-limit dimension.
Verbosity Indicators13 hits · 20 pts
SeverityFileLineSnippet
LOWmodules/vector-sets/hnsw.c1372 * So we need to check if this candidate is already linked to
LOWmodules/vector-sets/hnsw.c1702 // Step 5: Pair nodes greedily based on scores.
LOWsrc/lolwut8.c104 // Step 1: Shuffle the verses randomly.
LOWsrc/lolwut8.c107 // Step 2: Build stanza by finding compatible verses
LOWsrc/lolwut8.c151 // Step 3: Combine all stanza verses into single SDS string.
LOWsrc/lolwut8.c162 // Step 4: Make uppercase, and strip the "/".
LOWsrc/lolwut8.c168 // Step 5: Add background info about what the user just saw.
LOWsrc/t_stream.c4532 /* We need to check if the minimum idle time requested
LOWsrc/networking.c5320 /* We need to check if the soft limit is reached continuously for the
LOWsrc/server.c3272/* The purpose of this function is to try to "glue" consecutive range
LOWsrc/acl.c2455 /* If there are some subscribers, we need to check if we need to drop some clients. */
LOWsrc/script_lua.c610 /* We need to check if it is an array, an error, or a status reply.
LOWsrc/modules/hellotype.c177 * called when the key we blocked for is ready: we need to check if we
Deep Nesting19 hits · 19 pts
SeverityFileLineSnippet
LOWtools/array-bench.py217
LOWtools/array-bench.py237
LOWutils/req-res-log-validator.py195
LOWutils/req-res-log-validator.py125
LOWutils/generate-command-code.py252
LOWutils/generate-command-code.py273
LOWutils/generate-command-code.py274
LOWmodules/vector-sets/test.py175
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py13
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py31
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py63
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py82
LOWmodules/vector-sets/tests/replication.py14
LOWmodules/vector-sets/tests/deletion.py24
LOWmodules/vector-sets/tests/filter_int.py216
LOWmodules/vector-sets/examples/cli-tool/cli.py64
LOWmodules/vector-sets/examples/cli-tool/cli.py79
LOWmodules/vector-sets/examples/glove-100/recall.py37
LOWmodules/vector-sets/examples/glove-100/insert.py28
Hyper-Verbose Identifiers14 hits · 15 pts
SeverityFileLineSnippet
LOWutils/generate-commands-json.py10def convert_flags_to_boolean_dict(flags):
LOWutils/generate-commands-json.py35def convert_entry_to_objects_array(cmd, docs):
LOWutils/generate-command-code.py50def check_command_args_key_specs(args, command_key_specs_index_set, command_arg_key_specs_index_set):
LOWdeps/jemalloc/scripts/gen_travis.py210def generate_unusual_combinations(unusuals, max_unusual_opts):
LOWmodules/vector-sets/tests/threading_config.py49 def test_config_access_and_mutability(self):
LOWmodules/vector-sets/tests/threading_config.py108 def test_vsim_without_nothread(self, force_single_threaded=False):
LOWmodules/vector-sets/tests/threading_config.py156 def test_threading_mode_comparison(self):
LOWmodules/vector-sets/tests/threading_config.py180 def test_nothread_override_behavior(self):
LOWmodules/vector-sets/tests/deletion.py24 def format_neighbors_with_scores(self, links_result, old_links=None, items_to_remove=None):
LOWmodules/vector-sets/tests/filter_int.py83 def create_vectors_with_attributes(self, key, count):
LOWmodules/vector-sets/tests/filter_int.py509 def create_vector_with_age_attribute(self, name, age):
LOWmodules/vector-sets/examples/cli-tool/cli.py36def process_embedding_patterns(text):
LOWmodules/vector-sets/examples/cli-tool/cli.py44 def replace_with_embedding_and_text(match):
LOWsrc/server.c1183 * the function clientsCronTrackExpansiveClients(). */
Cross-Language Confusion3 hits · 15 pts
SeverityFileLineSnippet
HIGHdeps/jemalloc/scripts/gen_run_tests.py111 \$@ >> run_test.log 2>&1 || abort
HIGHdeps/jemalloc/scripts/gen_run_tests.py119%(config_line)s >> run_test.log 2>&1 || abort
HIGHdeps/jemalloc/scripts/gen_travis.py44 scripts/gen_travis.py > travis_script && diff .travis.yml travis_script
Redundant / Tautological Comments9 hits · 14 pts
SeverityFileLineSnippet
LOWutils/generate-command-code.py91 # Check if we have key_specs not used
LOWutils/lru/test-lru.rb115 # Check if evicted keys respect LRU
LOWmodules/vector-sets/test.py129 # Check if replication is established
LOWmodules/vector-sets/test.py235 # Check if Redis instances are empty
LOWmodules/vector-sets/test.py241 # Check if replica is running
LOW…ules/vector-sets/tests/concurrent_vadd_cas_del_vsim.py143 # Check if Redis is still responsive
LOWmodules/vector-sets/tests/deletion.py46 # Check if this neighbor was in the old links at this level
LOWmodules/vector-sets/tests/filter_int.py321 # Check if results array handling could be wrong
LOWsrc/module.c3635 * #### Return value
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippet
MEDIUMutils/redis-copy.rb10# for the more-robust redis-copy gem.
MEDIUMmodules/vector-sets/tests/filter_int.py269 # Build comprehensive debug message
Unused Imports6 hits · 6 pts
SeverityFileLineSnippet
LOWdeps/jemalloc/scripts/gen_travis.py4
LOWmodules/vector-sets/tests/vrand-ping-pong.py2
LOWmodules/vector-sets/tests/vrandmember.py1
LOWmodules/vector-sets/tests/vrandmember.py2
LOWmodules/vector-sets/tests/vadd_cas.py5
LOWmodules/vector-sets/tests/dimension_max_limit.py2
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippet
LOWsrc/crc64.c274 char li[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed "
LOWsrc/crc64.c274 char li[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed "
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippet
LOWutils/redis-sha1.rb11# If you hack this code make sure to sort keys and set elements as this are