소스 검색

Don't warn about docs for deprecated methods;

bjorn 11 달 전
부모
커밋
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 = {}
 
     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
     end