Repository Analysis

nim-lang/Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).

1.2 Likely human-written View on GitHub
1.2
Adjusted Score
1.2
Raw Score
100%
Time Factor
2026-05-29
Last Push
18,013
Stars
Nim
Language
47,072
Lines of Code
212
Files
54
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 0LOW 54

Pattern Findings

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

Over-Commented Block34 hits · 32 pts
SeverityFileLineSnippet
LOWconfig/nimdoc.cfg41</ul>
LOWconfig/nimdoc.cfg81# See doc.item for available substitution variables.
LOWtests/manyloc/packages/noconflicts.nim.cfg1# Mark noconflicts as project file
LOWtests/compiler/nim.cfg1# note: consider moving tests/compilerapi/ to tests/compiler/ since
LOWlib/nimbase.h41#define CLANG_NO_SANITIZE_ADDRESS
LOWlib/nimbase.h61# pragma GCC diagnostic ignored "-Winvalid-offsetof"
LOWlib/nimbase.h81
LOWlib/nimbase.h101# define N_INLINE(rettype, name) rettype __inline name
LOWlib/nimbase.h121# endif
LOWlib/nimbase.h141 #define NIM_THREAD_LOCAL thread_local
LOWlib/nimbase.h161#ifdef __cplusplus
LOWlib/nimbase.h181# define N_SAFECALL_PTR(rettype, name) rettype (__stdcall *name)
LOWlib/nimbase.h201# define N_STDCALL_PTR(rettype, name) rettype (*name)
LOWlib/nimbase.h221# else
LOWlib/nimbase.h241
LOWlib/nimbase.h261
LOWlib/nimbase.h281// On failure, your C compiler will say something like:
LOWlib/nimbase.h301
LOWlib/nimbase.h321#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901)
LOWlib/nimbase.h341# // both `((void*)0)` and `NULL` would cause codegen to emit
LOWlib/nimbase.h401typedef __INT32_TYPE__ NI32;
LOWlib/nimbase.h421#ifdef __UINT32_TYPE__
LOWlib/nimbase.h481#if defined(__cplusplus) && defined(__clang__)
LOWlib/nimbase.h501# endif
LOWlib/nimbase.h541# define NIM_UNLIKELY(x) __builtin_expect(x, 0)
LOWlib/nimbase.h561// Test to see if Nim and the C compiler agree on the size of a pointer.
LOWlib/nimbase.h581# include <types/vxWind.h>
LOWlib/nimbase.h601 /* arm-none-eabi-gcc and riscv32-unknown-elf-gcc targets define int32_t as long int */
LOWlib/cycle.h81#if TIME_WITH_SYS_TIME
LOWlib/wrappers/linenoise/linenoise.c101 * Sequence: ESC [ 2 J
LOWdoc/testament.md121 action: "run"
LOWdoc/testament.md161 # Error message the test should print, if any.
LOWdoc/advopt.txt1Advanced commands:
LOWdoc/tut3.md141 # output:
Redundant / Tautological Comments6 hits · 9 pts
SeverityFileLineSnippet
LOWtools/debug/nimlldb.py78 # Check if data pointer is Null
LOWtools/debug/nimlldb.py92 # Check if first element is NULL
LOWtools/debug/nimlldb.py109 # Check if data pointer is Null
LOWtools/debug/nimlldb.py121 # Check if first element is NULL
LOWtools/debug/nimlldb.py514 # Check if first element is NULL
LOWtools/debug/nimlldb.py531 # Check if first element is NULL
Deep Nesting4 hits · 4 pts
SeverityFileLineSnippet
LOWtools/debug/nim-gdb.py98
LOWtools/debug/nim-gdb.py240
LOWtools/debug/nimlldb.py792
LOWtools/debug/nimlldb.py763
Unused Imports3 hits · 3 pts
SeverityFileLineSnippet
LOWtools/debug/nim-gdb.py4
LOWtools/debug/nim-gdb.py5
LOWtests/untestable/gdb/gdb_pretty_printer_test.py3
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippet
LOWtools/debug/nim-gdb.py16except Exception as e:
LOWtools/debug/nim-gdb.py687 except Exception as e:
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippet
LOWtools/debug/nim-gdb.py692def register_nim_pretty_printers_for_object(objfile):
LOWtools/debug/nimlldb.py1240def breakpoint_function_wrapper(frame: lldb.SBFrame, bp_loc, internal_dict):
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippet
LOWtests/testdata/string.txt1Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magn
LOWtests/testdata/string.txt1Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magn
AI Slop Vocabulary1 hit · 1 pts
SeverityFileLineSnippet
LOWtools/debug/nim-gdb.py118 tname = target_type.name # could also just return 'string'