NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #3366 most downloaded on PyPI
A code analyzer without caring the C/C++ header files. It works with Java, C/C++, JavaScript, Python, Ruby, Swift, Objective C. Metrics includes cyclomatic complexity number etc.
Latest stable
1.26.0
Last release 11 days ago
10 Nov 2026
Release timing varies
gaps range from 8 days to 3 months
Most releases are documented
notes for 51 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
135 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Java: detect methods in classes with multiple annotations and after annotations with arguments inside a method body. Preserve method and constructor n
type in value expressions (PR #564)# in element text (PR #564)Swift: count each top-level comma of an if, guard or while condition list as a decision, like &&, so guard a, b, c else and guard a && b && c else hav
if, guard or while condition list as a decision, like &&, so guard a, b, c else and guard a && b && c else have the same CCN; commas inside brackets, closures, patterns and generic arguments, and repeat { } while, are not counted. A same-line trailing closure stays in the condition (if items.contains { $0 > 1 }, ready); a brace that continues on the next line is the bodycase declarations in an enum body as decisions, so enums no longer raise the CCN of the global scope (-Eoutside) or of a function declaring a local enum; case in a switch still countsvar body: some View { ... }) and a property initialized by a closure (let f: (Int) -> Int = { ... }) as a function named after the property, so their branches no longer count in the global scope; the function starts at the property name. Accessor blocks (get, set, willSet, didSet) are still reported as their accessors, and locals inside functions stay with the function"\(a ? b : c)"); interpolated expressions are tokenized as code, including nested strings and comments, while literal text, escapes, raw-string delimiters and multiline literals keep their meaning. A literal with interpolation is now reported as several tokens, so token counts for such strings changeif/for and punctuation such as ?, && or ; in children no longer add decisions; {...} child and attribute expressions are still analyzed. Element text, including its tags, is reported as text tokens, so token counts for JSX children change. Spread attributes ({...props}), hyphenated attribute names (data-x, aria-hidden) and valueless attributes (<Chart margin={m} accessibilityLayer>) are read as attributes, so they no longer end an element early and move the end of the enclosing function. A slash in element text (At 9% / 11%) no longer opens a regular expression that runs into the next closing tag'C' as one token, not as the lifetime 'C followed by a string that swallowed the code up to the next quote, which hid or merged the functions after it; lifetimes and labels are read as before|| of a closure without parameters (unwrap_or_else(|| 0), move || x) as a logical or; || after an expression is still counted${...} in an interface body or an object type alias (interface O { kind?: Extract<string, `x-${string}`>; }) no longer ends the declaration at the interpolation's }; previously the rest of the file was read as one template string, so every later function was folded into the global scopeYour coding agent can read these notes before it upgrades. Set up the MCP server →
Dart — discover .dart files and analyze functions, methods, getters, setters, and constructors with bodies, including expression bodies and async/gene
.dart files and analyze functions, methods, getters, setters, and constructors with bodies, including expression bodies and async/generator modifiers; handle raw and triple-quoted strings, null-safety operators, exception clauses, and switch-expression arms.cbl, .cob, and .cobol files in fixed format, report Procedure Division paragraphs as functions, and count core conditional, loop, and selection decisionse(r[0]) and return {w: [m[n - 1]]} (issue #524, PR #525)_ or $, type-keyword names, and empty destructuring slots; exclude TypeScript's this receiver from the parameter count and use the same count in text, CSV, HTML, and Checkstyle output (PRs #532, #535, #536, #537)-ENS: count nested control structures by indentation, including async statements and match, without treating comprehensions or conditional expressions as nested statements (PR #527)TypeScript: preserve function boundaries and NLOC after return type annotations, including adjacent annotated functions (issue #521)
anonymous__<n> names while preserving names for literals assigned to variables; do not report variadic function types or receive-only channels of functions as function literals (PR #522)python lizard.py with an extension that extends the core analyzer, such as -END, no longer fails with an AttributeError; it now matches the installed lizard commandlizard_core package, one module per responsibility; lizard still exposes every name it did before, and lizard_core module paths are not a supported import surfaceFull changelog: https://github.com/terryyin/lizard/compare/1.24.2...1.24.3
JavaScript, TypeScript, JSX, and TSX: count each ?? and ??= as +1 CCN; existing scores may decrease (issue #507)
?? and ??= as +1 CCN; existing scores may decrease (issue #507).init(, self.init(, .get(), .set(, variables named set, and argument labels such as init: from starting phantom functions that swallowed the following functionsinit: and for: when a newline or comment separates them from ( or ,#Preview, #expect, #available and other macros so their braces count; compiler directives stay whole linestype (.type, type(of:)) as a Go-style type declarationlet-else toward cyclomatic complexityusing declarations from swallowing following functions (PR #511).hh files as C/C++ headers (PR #510)Full changelog: https://github.com/terryyin/lizard/compare/1.24.1...1.24.2
Cognitive Complexity (-Ecognitive) — per-function Cognitive Complexity following SonarSource's specification (structural, hybrid, fundamental and nest
-Ecognitive) — per-function Cognitive Complexity following SonarSource's specification (structural, hybrid, fundamental and nesting increments; switch and logical operator sequences count once; lambdas nest; direct recursion counts), with a CogC column, a --CogC threshold and a cognitive_complexity field for -s/-T. Implemented as an extension that leaves the language readers and all existing metrics untouched (issue #432)when expressions (issue #493)match arms toward cyclomatic complexity and handle nested match expressions (issue #494)Full changelog: https://github.com/terryyin/lizard/compare/1.24.0...1.24.1
Halstead metrics (-Ehalstead) — per-function Halstead volume, difficulty, and effort (issue #464, PR #485)
-Ehalstead) — per-function Halstead volume, difficulty, and effort (issue #464, PR #485)--no-gitignore — analyze all discovered source files even when a .gitignore would exclude them (PR #488)record as a contextual keyword in field initializers and method declarations[...] type parameters (PR #484)FUNCTION_INFO fields (PR #486)# comment continuing past a trailing backslash (issue #317, PR #482)Published to PyPI via GitHub Actions (release.yml).
Python — structural pattern matching (match/case, PEP 634, Python 3.10+) is now counted correctly for cyclomatic complexity (including --modified mode
match/case, PEP 634, Python 3.10+) is now counted correctly for cyclomatic complexity (including --modified mode)R"(…)") from swallowing following code in the tokenizer (issue #478, PR #479)Published to PyPI via GitHub Actions (release.yml).
match/case, PEP 634, Python 3.10+) is now counted correctly:
case arm adds +1 to cyclomatic complexity (like an if/elif branch)case guards (case x if cond:) count the if as a normal conditioncase and match used as plain variable names (assignments, attribute access, function calls, subscripts, tuple unpacking, annotated assignments) are not counted — soft-keyword disambiguation via lookahead in preprocess--modified: an entire match/case block counts as 1, consistent with switch/case in C-family languagesR"(…)") from swallowing following code in the tokenizer (issue #478, PR #479)Co-authored-by: Cursor cursoragent@cursor.com
Co-authored-by: Cursor cursoragent@cursor.com
index.py): enable debug only when FLASK_DEBUG is set, not by default (PR #475)TypeScript: fix IndexError on nested template literals ( #471 , #472 ). See CHANGELOG.md.
IndexError when parsing nested template literals (issue #471, PR #472)Release 1.22.0: TypeScript, TSX, and JSX parser improvements (PRs #46 …
Release 1.22.0: TypeScript, TSX, and JSX parser improvements (PRs #46…
TypeScriptStates path as .ts (tokenizer-only layer for JSX), so class methods and CCN are no longer wrong or double-counted.interface { … } method signatures, type … = value types, abstract method declarations without bodies; ES2022 private names #foo in tokenization; smarter parameters (type keyword noise, commas inside Map<…>, etc.).handleClick = () => {}) are reported under the field name instead of (anonymous); better call vs definition and class-body cases (typed fields, static / async fields, LWC-style async x => fields, field = CONST.PROP;, JSX attribute expressions).Java parser: contextual record keyword and class-body brace depth (issue #470 ).
Java parser: contextual record keyword and class-body brace depth (issue #470).
Made-with: Cursor
record as a contextual keyword (field and method name record are no longer parsed as a record class); track brace depth for field array/object initializers so = { } does not end the class body before a static block (issue #470)Release workflow: clarify how PyPI matches trusted publishers (repository owner id, workflow file, environment); add optional PYPI_API_TOKEN secret fo
PYPI_API_TOKEN secret for token-based upload when OIDC is not usedNew GitHub Actions workflow builds sdist/wheel on semver tags and publishes via PyPI trusted publishing (pypi environment).
Made-with: Cursor
@Transactional(rollbackFor = Exception.class)) being parsed as methods and corrupting complexity (issue #463)Fix nesting depth calculation for C++ else if chains (issue #418)
else if chains (issue #418)
else if () {} is now treated as same nesting level as if, not as nestedFix Ruby parser hang on %i[] and %I[] symbol array literals (issue #457)
Add selective metric forgiveness (issue #455)
#lizard forgives(length) to forgive only specific metrics#lizard forgives(length, parameter_count) for multiple metrics#lizard forgives without parentheses continues to forgive all metrics (backward compatible)record keyword and variables named "record"Fix IndexError crash when parsing C++ raw string literals containing braces
R"delimiter(content)delimiter")Full Changelog: https://github.com/terryyin/lizard/compare/1.19.0...1.20.0
Add PL/SQL language support with comprehensive parsing for procedures, functions, and triggers
Add R language support with comprehensive function parsing
Nothing published for this version
Fix TypeScript function detection issue.
Fix TypeScript function detection issue.
Fix modern PHP issues.
Fix modern PHP issues.
Fix Java function count issue.
Fix Java function count issue.
Fix Java function count issue.
Fix Java function count issue.
Bug fixes. "lizard forgive" for python
Bug fixes. "lizard forgive" for python
Added support for #lizard forgive global to suppress warnings for all code outside of functions, for languages like Python, Perl, etc, that allow glob
Added support for #lizard forgive global to suppress warnings for all code outside of functions, for languages like Python, Perl, etc, that allow global code.
#lizard forgive at the global level will suppress warnings for all code after it.
Bug fixes.
Bug fixes.
Add Complete Perl support.
Add Complete Perl support.
Add Perl support.
Add Perl support.
Nothing published for this version
Bug fixes.
Bug fixes.
Bug fixes.
Bug fixes.
Bug fixes.
Bug fixes.
Add support for gitignore files. A few bug fixes.
Add support for gitignore files. A few bug fixes.
Add VueJS support.
Add VueJS support.
Add TSX support.
Add TSX support.
Bug fix: Replace re.NOFLAG with 0 to make it compatible with Python 3.10+
Bug fix: Replace re.NOFLAG with 0 to make it compatible with Python 3.10+
Bug fix: Fortran support for ELSEIF
Bug fix: Fortran support for ELSEIF
Nothing published for this version
Bug fix: Java generic like List<? extends String> JSX file extension
Bug fix: Java generic like List<? extends String> JSX file extension
Add Fortran to the language supported
Add Fortran to the language supported
Bug fixing. typedef being read properly.
Bug fixing. typedef being read properly.
Bug fixing. .mm file was not recognized as object-c(++) file.
Bug fixing. .mm file was not recognized as object-c(++) file.
Nothing published for this version
Bug fixing in Lua and Scala support
Bug fixing in Lua and Scala support
Fix missing file when install
Fix missing file when install
Fix HTML Output template problem.
Fix HTML Output template problem.
Support JavaScript with ES6 and JSX. Support Rust
Support JavaScript with ES6 and JSX. Support Rust
'for' keyword in Swift label should not be counted as ccn.
Bug fixes:
'for' keyword in Swift label should not be counted as ccn.
'guard' keyword should be counted.
'-o' or '--output_file' parameter added.
Nothing published for this version
Fix the performance issue
Fix the performance issue
Nothing published for this version
Add Lua to the languages.
Add Lua to the languages.
Fix a bug in MSVS format output.
Fix a bug in MSVS format output.
Minor fix for the average NCSS (lines of code) in the XML output. Previously, the average NCSS per function included code outside any function. Now th
Minor fix for the average NCSS (lines of code) in the XML output. Previously, the average NCSS per function included code outside any function. Now this is fixed.
Nothing published for this version
Nothing published for this version
An important new feature -- duplicate detector -- in the form of an extension.
An important new feature -- duplicate detector -- in the form of an extension.
Usage:
lizard -Eduplicate
The current version hasn't had any performance optimization yet. Yet, it can scan 1000 cpp files in less than 2 minutes.
Code after comments containing "GENERATED CODE" will be ignored.
Nothing published for this version
One column per quarter.