npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codacy/tools-lizard-1

v0.6.2

Published

Lizard adapter — CLI-mode code complexity analyzer

Readme

@codacy/tools-lizard-1

Table of Contents


Overview

Code complexity analyzer using the Lizard Python tool. Uses the CLI execution strategy -- spawns lizard via spawnTool() and parses its plain-text output.

Unlike standard linters that emit rule violations, Lizard reports raw metrics (NLOC, CCN, parameter count). The adapter transforms these metrics into issues by applying configurable thresholds at three severity tiers (minor, medium, critical).

| Property | Value | | ------------- | ------------------------------------------------------------------------------------------------------------- | | Tool ID | Lizard | | Codacy UUID | 76348462-84b3-409a-90d3-955e90abfb87 | | Strategy | CLI | | Languages | C, C++, C#, Go, Java, JavaScript, Kotlin, Lua, Objective-C, PHP, Python, Ruby, Rust, Scala, Swift, TypeScript | | Binary | lizard (Python pip package) | | Pattern count | 12 (3 metrics x 3 severity tiers + 3 file-level) | | Prerequisites | Python 3 |

Updating patterns

# Re-fetch pattern metadata from the Codacy API
pnpm prefetch

# Commit the result
git add src/patterns.json

Pattern IDs follow the format Lizard_ccn-medium, Lizard_nloc-critical, Lizard_file-nloc-minor, etc.

Updating the Lizard version

  1. Update preferredVersion in src/adapter.ts
  2. Update the PIP_PACKAGE constant to match
  3. Run pnpm prefetch to check for any pattern changes
  4. Run pnpm test to verify compatibility
  5. If the major version changes, create a new adapter package (lizard-2/)

Development

pnpm build    # Build with tsup
pnpm test     # Run tests (some require lizard in PATH)

Installing lizard locally:

pip install lizard==1.21.2

Or let the adapter install it automatically via --install-dependencies.

Notes for maintainers

  • Lizard outputs plain text (not JSON/XML). The adapter parses two sections: methods and files.
  • The -V flag enables verbose function names; -f reads a file list from a temporary file.
  • No threshold flags are passed to lizard -- the adapter applies its own thresholds from Codacy pattern parameters.
  • Each pattern has a single threshold parameter. If not provided, defaults are used.
  • Thresholds are checked in descending severity order (critical -> medium -> minor). Only the highest severity match is emitted per metric group per function/file.
  • A single function can produce up to 3 issues (one per metric: NLOC, CCN, parameter count).
  • File-level NLOC issues are reported at line 1.
  • Lizard has no configuration file format -- checkLocalConfigurationFile always returns { found: false }.
  • The adapter uses Python venv utilities from @codacy/tooling (findPython, ensureVenv, pipInstall) for installation.
  • The lineContent field is empty for Lizard issues because the issue refers to a whole function, not a specific line of code.