Repository Analysis

valkey-io/valkey

A flexible distributed key-value database that is optimized for caching and other realtime workloads.

1.3 Likely human-written View on GitHub
1.3
Adjusted Score
1.3
Raw Score
100%
Time Factor
2026-05-30
Last Push
25,950
Stars
C
Language
414,799
Lines of Code
1522
Files
487
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 4MEDIUM 11LOW 472

Pattern Findings

487 matches across 13 categories. Click a row to expand file-level details.

Over-Commented Block400 hits · 388 pts
SeverityFileLineSnippet
LOWtests/rdma/rdma-test.c21#include <errno.h>
LOWtests/modules/blockedclient.c1/* define macros for having usleep */
LOWutils/gen-test-certs.sh1#!/bin/bash
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/hyperloglog/hll-gnuplot-graph.rb1# hll-err.rb - Copyright (C) 2014 Redis Ltd.
LOWdeps/fast_float/ffc.h1// fast_float by Daniel Lemire (Original)
LOWdeps/fast_float/ffc.h21// Licensed under the Apache License, Version 2.0, or the
LOWdeps/fast_float/ffc.h41// The above copyright notice and this permission notice
LOWdeps/fast_float/ffc.h61//
LOWdeps/fast_float/ffc.h81// the above license grant, this restriction and the following disclaimer,
LOWdeps/fast_float/ffc.h261
LOWdeps/fast_float/ffc.h381 defined(__MINGW64__) || defined(__s390x__) || \
LOWdeps/fast_float/ffc.h401#define FFC_64BIT 1
LOWdeps/fast_float/ffc.h421#define FFC_IS_BIG_ENDIAN 0
LOWdeps/fast_float/ffc.h441#
LOWdeps/fast_float/ffc.h461#if defined(__aarch64__) || defined(_M_ARM64)
LOWdeps/fast_float/ffc.h481#define FFC_SIMD_DISABLE_WARNINGS \
LOWdeps/fast_float/ffc.h581#define FFC_DOUBLE_INFINITE_POWER 0x7FF
LOWdeps/fast_float/ffc.h601#define FFC_FLOAT_MAX_EXPONENT_FAST_PATH 10
LOWdeps/fast_float/ffc.h781 return false;
LOWdeps/fast_float/ffc.h801//
LOWdeps/fast_float/ffc.h821#elif defined(__clang__)
LOWdeps/fast_float/ffc.h1561#endif // FFC_PARSE_H
LOWdeps/fast_float/ffc.h1601// number of bits in a bigint. this needs to be at least the number
LOWdeps/fast_float/ffc.h2701// parse the significant digits as a big integer to unambiguously round
LOWdeps/fast_float/ffc.h2741 // The required precision is mantissa_explicit_bits + 3 because
LOWdeps/fast_float/ffc.h2861 // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round
LOWdeps/fast_float/ffc.h2941 // we want round-to-nearest in all cases, irrespective of the rounding mode
LOWdeps/fast_float/ffc.h3201#undef FFC_DOUBLE_MINIMUM_EXPONENT
LOWdeps/fast_float/ffc.h3221#undef FFC_FLOAT_EXPONENT_MASK
LOWdeps/libvalkey/include/valkey/valkey.h41#include <sys/time.h> /* for struct timeval */
LOWdeps/libvalkey/include/valkey/visibility.h41#else
LOWdeps/libvalkey/include/valkey/sockcompat.h41#include <sys/select.h>
LOWdeps/libvalkey/include/valkey/sockcompat.h81int win32_valkeyKeepAlive(SOCKET sockfd, int interval_ms);
LOWdeps/libvalkey/include/valkey/read.h41/* When an error occurs, the err flag in a context is set to hold the type of
LOWdeps/libvalkey/tests/client_test.c1#include "fmacros.h"
LOWdeps/libvalkey/tests/client_test.c21
LOWdeps/libvalkey/tests/ct_connection.c1#include "adapters/libevent.h"
LOW…y/tests/scripts/connect-during-cluster-startup-test.sh1#!/bin/sh
LOWdeps/libvalkey/tests/scripts/moved-redirect-test.sh1#!/bin/bash
LOW…ect-during-cluster-startup-using-cluster-nodes-test.sh1#!/bin/sh
LOW…ripts/client-disconnect-without-slotmap-update-test.sh1#!/bin/bash
LOW…libvalkey/tests/scripts/redirect-with-hostname-test.sh1#!/bin/sh
LOW…ests/scripts/connect-error-using-cluster-nodes-test.sh1#!/bin/sh
LOW…/libvalkey/tests/scripts/command-from-callback-test.sh1#!/bin/bash
LOW…ey/tests/scripts/ask-redirect-connection-error-test.sh1#!/bin/bash
LOWdeps/libvalkey/tests/scripts/timeout-handling-test.sh1#!/bin/bash
LOW…s/scripts/dbsize-to-all-nodes-during-scaledown-test.sh1#!/bin/bash
LOWdeps/libvalkey/tests/scripts/cluster-scale-down-test.sh1#!/bin/bash
LOW…pts/dbsize-to-all-nodes-during-scaledown-test-async.sh1#!/bin/bash
LOWdeps/libvalkey/scripts/gencommands.py1#!/usr/bin/env python3
LOWdeps/libvalkey/scripts/gencommands.py21#
LOWdeps/libvalkey/scripts/gencommands.py41 for arg in arguments:
LOWdeps/libvalkey/src/async.c41#include <strings.h>
LOWdeps/libvalkey/src/rdma.c41#include <arpa/inet.h>
340 more matches not shown…
Hyper-Verbose Identifiers32 hits · 40 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.py48def check_command_args_key_specs(args, command_key_specs_index_set, command_arg_key_specs_index_set):
LOWdeps/libvalkey/scripts/gencommands.py145def collect_command_from_cmddef_h(f, commands):
LOWdeps/libvalkey/scripts/gencommands.py163def collect_commands_from_files(filenames):
LOWdeps/jemalloc/scripts/gen_travis.py210def generate_unusual_combinations(unusuals, max_unusual_opts):
LOWdeps/gtest-parallel/gtest_parallel_tests.py129 def test_passing_task_succeeds(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py139 def test_failing_task_fails_even_with_retries(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py144 def test_executing_passing_and_failing_fails(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py155 def test_task_succeeds_with_one_retry(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py162 def test_task_fails_with_one_retry(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py169 def test_runner_succeeds_when_all_tasks_eventually_succeeds(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py254 def test_running_parallel_test_cases_without_repeats(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py262 def test_running_parallel_test_cases_with_repeats(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py270 def test_running_parallel_tests(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py280 def test_race_in_test_times_load_save(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py576 def test_does_not_run_disabled_tests_by_default(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py584 def test_runs_disabled_tests_when_asked(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py593 def test_runs_failed_tests_by_default(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py600 def test_runs_only_failed_tests_when_asked(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py608 def test_does_not_apply_gtest_filter_by_default(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py615 def test_applies_gtest_filter(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py620 def test_applies_gtest_color_by_default(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py630 def test_repeats_tasks_once_by_default(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py634 def test_repeats_tasks_multiple_times(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py187 def test_get_save_file_path_unix(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py376 def test_logs_to_temporary_files_without_output_dir(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py415 def test_run_interrupted_task_with_transient_log(self):
LOWdeps/gtest-parallel/gtest_parallel_tests.py645 def test_gtest_list_tests_fails(self):
LOWdeps/gtest-parallel/gtest_parallel.py279 def __get_next_execution_number(self, test_id):
LOWsrc/server.c1180 * the function clientsCronTrackExpensiveClients(). */
LOWsrc/unit/wrapper_util.py50def find_wrapper_functions_in_header(header_file_name):
Cross-Language Confusion4 hits · 20 pts
SeverityFileLineSnippet
HIGHtests/rdma/rdma_env.py21 cmd = "modprobe rdma_cm && modprobe udp_tunnel && modprobe ip6_udp_tunnel && modprobe ib_uverbs"
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
Excessive Try-Catch Wrapping10 hits · 17 pts
SeverityFileLineSnippet
LOWutils/req-res-log-validator.py211 except Exception as err:
LOWutils/req-res-log-validator.py253 except Exception as e:
MEDIUMutils/generate-command-code.py602 print("Error processing %s: %s" % (filename, err))
MEDIUMutils/generate-command-code.py631 print("Error: There are errors in the commands check, please check the above logs.")
MEDIUMdeps/libvalkey/scripts/gencommands.py160 print("Error processing line: %s" % (line))
MEDIUMdeps/libvalkey/scripts/gencommands.py191 print("Error processing %s: %s" % (filename, err))
LOWdeps/gtest-parallel/gtest_parallel.py628 except Exception:
MEDIUMdeps/gtest-parallel/gtest_parallel.py624def __read_test_times_file(fd):
MEDIUMsrc/unit/generate-redefine-syms.py44 print(f"Error running nm on '{object_file}': {e}", file=sys.stderr)
MEDIUMsrc/unit/generate-redefine-syms.py66 print(f"Error: File '{file_path}' does not exist.", file=sys.stderr)
Verbosity Indicators10 hits · 15 pts
SeverityFileLineSnippet
LOW.github/workflows/test-failure-detector.yml26 # Step 1: Download consolidated artifact
LOW.github/workflows/test-failure-detector.yml70 # Step 2: Get per-job URLs
LOW.github/workflows/test-failure-detector.yml109 # Step 3: Parse and merge failures
LOW.github/workflows/test-failure-detector.yml157 # Step 4: Create or update issues
LOWsrc/t_stream.c3258 /* We need to check if the minimum idle time requested
LOWsrc/networking.c6154 /* We need to check if the soft limit is reached continuously for the
LOWsrc/server.c3234/* The purpose of this function is to try to "glue" consecutive range
LOWsrc/acl.c2636 /* If there are some subscribers, we need to check if we need to drop some clients. */
LOWsrc/modules/hellotype.c185 * called when the key we blocked for is ready: we need to check if we
LOWsrc/modules/lua/script_lua.c385 /* We need to check if it is an array, an error, or a status reply.
Deep Nesting14 hits · 14 pts
SeverityFileLineSnippet
LOWtests/rdma/run.py31
LOWutils/req-res-log-validator.py186
LOWutils/req-res-log-validator.py116
LOWutils/generate-command-code.py305
LOWutils/generate-command-code.py326
LOWutils/generate-command-code.py327
LOWdeps/libvalkey/scripts/gencommands.py58
LOWdeps/libvalkey/scripts/gencommands.py163
LOWdeps/gtest-parallel/gtest_parallel.py636
LOWdeps/gtest-parallel/gtest_parallel.py701
LOWdeps/gtest-parallel/gtest_parallel.py380
LOWdeps/gtest-parallel/gtest_parallel.py710
LOWsrc/unit/wrapper_util.py15
LOWsrc/unit/wrapper_util.py50
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMutils/gen-test-certs.sh66# Create a CA bundle and hashed CA directory used by TLS tests.
MEDIUM.github/workflows/provenance-refresh.yml39 # Create the DB branch on first run, otherwise reuse it.
MEDIUMdeps/libvalkey/scripts/gencommands.py4# This file is released under the BSD license, see the COPYING file
Redundant / Tautological Comments3 hits · 4 pts
SeverityFileLineSnippet
LOWutils/generate-command-code.py89 # Check if we have key_specs not used
LOWutils/lru/test-lru.rb115 # Check if evicted keys respect LRU
LOWsrc/module.c3734 * #### Return value
AI Slop Vocabulary2 hits · 4 pts
SeverityFileLineSnippet
MEDIUMutils/redis-copy.rb7# for the more-robust redis-copy gem.
LOWdeps/gtest-parallel/gtest_parallel.py52# Before a SIGINT is seen, wait(p) will simply call p.wait() and
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippet
LOWutils/redis-sha1.rb8# If you hack this code make sure to sort keys and set elements as this are
LOWsrc/commands.h60/* Command flags. Please don't forget to add command flag documentation in struct
LOWsrc/lolwut9.c81 output_array = sdscatprintf(output_array, "Don't forget to have fun! %s ver. ", server.extended_redis_compat ? "Redi
Unused Imports2 hits · 2 pts
SeverityFileLineSnippet
LOWtests/rdma/rdma_env.py16
LOWdeps/jemalloc/scripts/gen_travis.py4
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippet
LOWdeps/gtest-parallel/gtest_parallel_mocks.py99 def run_task(self, task, timeout_per_test):
LOWdeps/gtest-parallel/gtest_parallel.py307 def run_task(self, task, timeout_per_test):
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippet
LOWsrc/unit/test_crc64.cpp31 unsigned char li[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed "
LOWsrc/unit/test_crc64.cpp31 unsigned char li[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed "