Skip to content

检查lua 重写父类函数,没有调用父类函数问题

Notifications You must be signed in to change notification settings

firleaves/PyLuaCheck

Repository files navigation

本插件用来检查使用继承的lua对象,检查重写父类函数,没有调用父类函数问题

只会检查class命名

local foo = class("foo",require("base"))

function foo:ctor()
    foo.super.ctor(self) --如果没有写这个,会提示错误
end

pyluacheck.checkClass 配置检查继承不同的类,需要检查的函数

  • name要写你要检查的基类的全lua路径 *
"pyluacheck.checkClass": [
    {
        "name":"Base",
        "overrideFunc":[
            "Ctor","Destroy"
        ]
    },
    {
        "name":"UI.BaseUI",  
        "overrideFunc":[
            "Ctor","Close"
        ]
    },
]

项目源码

依赖项目(已经包含插件内):

About

检查lua 重写父类函数,没有调用父类函数问题

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published