Skip to content

Report lizard's -ENS counter leak upstream #2

Description

@TheTechSensei

lizard's nested-structures extension (-ENS) accumulates its counter across functions and across files, and the reported value changes with the order of files on the command line.

lizard -ENS tiny.py            -> uno: max_nested_structures = 1
lizard -ENS tiny.py sample.py  -> uno = 1, __init__ = 0, sumar = 11, libre = 13

libre is literally return a if b else c, reported as 13 nested structures.

Unlike the radon finding, this one is a bug: it is not a defensible design decision, and lizard's own documentation does not mention it as a limitation.

The task

  1. Reproduce it minimally — two small files, run in both orders, show the difference.
  2. Open an issue on terryyin/lizard with the reproduction.
  3. While there: its PyPI classifier reads Freeware while its shipped LICENSE.txt is full MIT. That is a one-line metadata fix worth mentioning in the same breath or a separate issue.

This package deliberately does not use -ENS for this reason (see src/dca/adapters/lizard_adapter.py), so nothing here depends on the fix — it is purely for lizard's other users.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueSmall, self-contained, and a good way inupstreamBelongs in another project's tracker

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions