Repository Analysis

official-stockfish/Stockfish

A free and strong UCI chess engine

5.3 Low AI signal View on GitHub
5.3
Adjusted Score
5.3
Raw Score
100%
Time Factor
2026-05-29
Last Push
15,704
Stars
C++
Language
29,122
Lines of Code
100
Files
123
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 2MEDIUM 10LOW 111

Pattern Findings

123 matches across 8 categories. Click a row to expand file-level details.

Over-Commented Block95 hits · 95 pts
SeverityFileLineSnippet
LOWscripts/get_native_properties.sh1#!/bin/sh
LOWsrc/memory.cpp21#include <cstdlib>
LOWsrc/memory.cpp41 #include <stdlib.h>
LOWsrc/thread.cpp21#include <algorithm>
LOWsrc/engine.h21
LOWsrc/shm_linux.h21
LOWsrc/numa.h21
LOWsrc/numa.h41
LOWsrc/numa.h501// Use system-reported L3 domains
LOWsrc/numa.h521// As a special case, when performing system-wide replication of read-only data
LOWsrc/numa.h601 // This is needed between Windows 10 Build 20348 and Windows 11, because
LOWsrc/numa.h901 if (SetThreadSelectedCpuSetMasks_f == nullptr || STARTUP_USE_OLD_AFFINITY_API)
LOWsrc/types.h21
LOWsrc/types.h41 #include <cstdint>
LOWsrc/types.h61// Enforce minimum GCC version
LOWsrc/types.h81 #endif
LOWsrc/types.h221
LOWsrc/types.h421 EN_PASSANT = 2 << 14,
LOWsrc/misc.cpp21#include <array>
LOWsrc/misc.cpp241 compiler += " AVX512ICL";
LOWsrc/misc.cpp261#endif
LOWsrc/tune.h61// and a my_range() function to set custom Option's min-max values, then you just
LOWsrc/misc.h21
LOWsrc/misc.h321};
LOWsrc/misc.h521#elif defined(__GNUC__)
LOWsrc/misc.h541#elif defined(_MSC_VER)
LOWsrc/benchmark.cpp381// are five parameters: TT size in MB, number of search threads that
LOWsrc/evaluate.cpp21#include <algorithm>
LOWsrc/thread.h21
LOWsrc/history.h21
LOWsrc/search.cpp21#include <algorithm>
LOWsrc/search.cpp41#include "movepick.h"
LOWsrc/search.cpp381 // Adjust the effective depth searched, but ensure at least one
LOWsrc/shm.h21
LOWsrc/shm.h41#endif
LOWsrc/shm.h61 #endif
LOWsrc/shm.h81#elif defined(__FreeBSD__)
LOWsrc/memory.h21
LOWsrc/engine.cpp21#include <algorithm>
LOWsrc/attacks.h21
LOWsrc/attacks.h81 // file, diagonal, unused, antidiagonal
LOWsrc/movegen.cpp21#include <cassert>
LOWsrc/tt.cpp21#include <algorithm>
LOWsrc/tt.cpp41// depth 8 bit
LOWsrc/search.h21
LOWsrc/tt.h21
LOWsrc/position.h21
LOWsrc/position.cpp21#include <algorithm>
LOWsrc/uci.cpp21#include <algorithm>
LOWsrc/universal/patch_x86_slice.sh1#!/bin/sh
LOWsrc/universal/nnue_embed.cpp21#include "../evaluate.h"
LOWsrc/nnue/network.cpp21#include <cstdlib>
LOWsrc/nnue/network.cpp41// data in the engine binary (using incbin.h, by Dale Weiler).
LOWsrc/nnue/nnue_accumulator.cpp21#include <cassert>
LOWsrc/nnue/nnue_common.h21#ifndef NNUE_COMMON_H_INCLUDED
LOWsrc/nnue/nnue_feature_transformer.h21#ifndef NNUE_FEATURE_TRANSFORMER_H_INCLUDED
LOWsrc/nnue/nnue_feature_transformer.h101#if defined(USE_AVX512)
LOWsrc/nnue/nnue_feature_transformer.h241 #endif
LOWsrc/nnue/nnue_feature_transformer.h261 // means our pairwise product is zero. If we perform packus and
LOWsrc/nnue/nnue_feature_transformer.h281 // might occupy the signed bit, resulting in some positive
35 more matches not shown…
Decorative Section Separators6 hits · 18 pts
SeverityFileLineSnippet
MEDIUMscripts/get_native_properties.sh10# ---------------------------
MEDIUMscripts/get_native_properties.sh12# ---------------------------
MEDIUMscripts/get_native_properties.sh180# ---------------------------
MEDIUMscripts/get_native_properties.sh182# ---------------------------
MEDIUMscripts/get_native_properties.sh253# ---------------------------
MEDIUMscripts/get_native_properties.sh255# ---------------------------
Hyper-Verbose Identifiers11 hits · 14 pts
SeverityFileLineSnippet
LOWtests/instrumented.py167 def test_export_net_verify_nnue(self):
LOWtests/instrumented.py232 def test_ucinewgame_and_startpos_moves(self):
LOWtests/instrumented.py314 def test_fen_position_fixed_node(self):
LOWtests/instrumented.py322 def test_fen_position_with_mate_go_depth(self):
LOWtests/instrumented.py332 def test_fen_position_with_mate_go_mate(self):
LOWtests/instrumented.py342 def test_fen_position_with_mate_go_nodes(self):
LOWtests/instrumented.py362 def test_fen_position_with_mate_go_depth_and_promotion(self):
LOWtests/instrumented.py371 def test_fen_position_with_mate_go_depth_and_searchmoves(self):
LOWtests/instrumented.py381 def test_fen_position_with_moves_with_mate_go_depth_and_searchmoves(self):
LOWtests/instrumented.py407 def test_fen_position_with_skill_level(self):
LOWtests/testing.py42 def get_valgrind_thread_command():
Cross-Language Confusion2 hits · 10 pts
SeverityFileLineSnippet
HIGHtests/instrumented.py221 self.stockfish.equals("uciok")
HIGHtests/instrumented.py303 self.stockfish.equals("bestmove d5e6")
AI Slop Vocabulary3 hits · 9 pts
SeverityFileLineSnippet
MEDIUMsrc/shm_linux.h605 // TODO: Not robust. Need to avoid residual pages if the process
MEDIUMsrc/numa.h1062 // node. On Windows we utilize GetNumaProcessorNodeEx, which has its quirks, see
MEDIUMsrc/search.cpp1299 // std::clamp has been replaced by a more robust implementation.
Deep Nesting3 hits · 3 pts
SeverityFileLineSnippet
LOWtests/instrumented.py42
LOWtests/testing.py92
LOWtests/testing.py167
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUM.github/workflows/stockfish.yml85 # Create a new pre-release, the other upload_binaries.yml will upload the binaries
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippet
LOWtests/testing.py180 except Exception as e:
LOWtests/testing.py233 except Exception as e: