Skip to content

Lua decorators / generics: EmmyLua ---@ annotations are comments, so both rules are dead on authentic code #9450

Backlog

Description

@squid-protocol

SOP-002-v1 gap-cell decoy suite (epic #8863), Lua batch.

Dead rules. Lua decorators (^[ \t]*---@[a-zA-Z_]\w*) and generics (---@(?:generic|type)\s+...) match EmmyLua annotation lines, but every ---@... line is a -- comment, and the comment stream is blanked before the rules run. No authentic EmmyLua annotation can make either rule fire (the only hit found is the text inside a quoted string, local t = '---@generic T', for generics).

---@class Foo        -- decorators: expected >= 1, actual 0
---@generic T        -- generics:   expected >= 1, actual 0
---@type Foo<T>

So both cells stay without a SOP-002 baseline row; the positive controls are pinned by strict xfail in tests/decoys/test_decoy_lua.py. The fix is a rule or stream decision (read the annotation from the comment stream, as Go //go: pragmas are read from raw lines), not part of this measurement PR.

Activity

  1. added
    bug
    on Nov 26, 2026
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions