Skip to content

Doc CLI tool ignores deprecated attribute #859

@corpserot

Description

@corpserot

test.lua:

---@[deprecated("This class is deprecated")]
---@class MyThing
---@[deprecated("This field is deprecated")]
---@field myfield integer
emmylua_doc_cli produces the following JSON output. I've snipped out the irrelevant parts for brevity. The only thing inside the workspace is the test.lua file.
{  "types": [
    {
      "type": "class",
      "name": "MyThing",
      "description": "",
      "visibility": null,
      "deprecated": false, // 🔴
      "deprecation_reason": null, // 🔴
      "tag_content": null,
      "loc": [
        {
          "file": "C:/Users/USER/Projects/luanti-api/test/test.lua",
          "line": 2
        }
      ],
      "bases": [],
      "generics": [],
      "members": [
        {
          "type": "field",
          "name": "myfield",
          "description": null,
          "visibility": null,
          "deprecated": false, // 🔴
          "deprecation_reason": null, // 🔴
          "tag_content": null,
          "loc": {
            "file": "C:/Users/USER/Projects/luanti-api/test/test.lua",
            "line": 4
          },
          "typ": "integer",
          "literal": null
        }
      ]
    }
  ]
}
also, the following markdown is produced for this type. I kept the empty lines it made.
# class MyThing











---



## fields
---

### MyThing.myfield
---
```lua
MyThing.myfield : integer
```











Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions