--- id: lizard version: "1.23.0" license: MIT license_treatment: permissive maintenance: active --- # lizard — 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. License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does Lizard is a static code analyzer that measures cyclomatic complexity and other code metrics across many programming languages including C/C++, Java, Python, JavaScript, and others. It calculates lines of code without comments, cyclomatic complexity number, token count, and parameter count for each function, then reports functions exceeding configurable thresholds. It also performs copy-paste detection to identify duplicate code blocks. The tool is designed to work without requiring complete header files or imports, making it practical for analyzing incomplete or complex codebases. It can output results in multiple formats (tabular, XML, CSV, HTML, Checkstyle) and supports filtering via .gitignore patterns or custom exclusion rules. You can run it as a standalone script or install it for full functionality, and it supports parallel analysis via configurable worker threads. Use it for: - Measure cyclomatic complexity in legacy codebases to identify functions needing refactoring. - Detect copy-pasted code blocks across a project to consolidate duplicated logic. - Generate HTML or XML reports for code quality dashboards and CI/CD pipeline integration. - Enforce coding standards by setting thresholds for complexity, function length, and parameter count. - Analyze multi-language projects (e.g., C++ backend + JavaScript frontend) in a single run. - Identify overly complex functions during code review to guide refactoring priorities. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Lizard analyzes code complexity and detects code clones across many programming languages, measuring cyclomatic complexity, lines of code, token count, and function parameters. Yes. Lizard is actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. It solves a real problem—measuring code complexity across many languages without requiring complete build environments—and is suitable for both standalone use and CI/CD integration. The 2446 repository stars and top-5000 PyPI tier indicate solid community adoption. ## Install pip install lizard uv add lizard poetry add lizard ## Installing lizard Before you install: Low install friction with only two runtime dependencies (pygments and pathspec). The package is actively maintained with a recent release and 2446 repository stars, indicating stable, community-backed development. License in practice: MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install lizard lizard mySource/ lizard -C 15 -a 5 mySource/ --xml Requires python3.8 or above; early versions are not verified. Verify before relying: - Whether the tool's copy-paste detection accuracy and performance scale well for very large codebases. - Whether all listed language parsers are equally mature or if some are experimental. - Performance characteristics when analyzing code with many threads enabled. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags cyclomatic complexity analyzer, code clone detection, static code analysis tool, code quality metrics, multi-language code analyzer, copy-paste detection, function complexity measurement, code-metrics, multi-language, ci-cd-ready [View on SkillFed](https://skillfed.io/packages/lizard) · [View on PyPI](https://pypi.org/project/lizard/)