remove_attribute
unreleased
Parameters
| Name | Type | Description |
|---|---|---|
| match |
| Attribute names matching any of the given regular expressions will be removed. When empty (default), all attributes are removed. |
The remove_attribute rule can remove specific function attributes or all function attributes. Attributes are metadata annotations that can be attached to functions using the @ symbol (e.g., @deprecated, @native).
By default, all attributes are removed. The match parameter allows selective removal of only specific attributes using regular expressions. For example, to remove @deprecated attributes while keeping @native, configure the rule this way:
{
rule: "remove_attribute",
match: ["deprecated"],
}Examples
@deprecated
local function example()
return process()
end
local function example()
return process()
end
| Input | Output |
|---|---|
| |