浏览代码

Don't warn about docs for deprecated methods;

bjorn 10 月之前
父节点
当前提交
233ac13901
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      api/main.lua

+ 3 - 1
api/main.lua

@@ -355,7 +355,9 @@ local function validateObject(object)
     local hasMethod = {}
     local hasMethod = {}
 
 
     for _, method in ipairs(object.methods or {}) do
     for _, method in ipairs(object.methods or {}) do
-      warnIf(not metatable[method.name], '%s has docs for unknown method %s', object.name, method.name)
+      if not metatable[method.name] and not method.deprecated then
+        warn('%s has docs for unknown method %s', object.name, method.name)
+      end
       hasMethod[method.name] = true
       hasMethod[method.name] = true
     end
     end