diff options
Diffstat (limited to 'server-beta/src/core')
-rw-r--r-- | server-beta/src/core/diagnostics/redundant-parameter.lua | 6 | ||||
-rw-r--r-- | server-beta/src/core/diagnostics/unused-function.lua | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/server-beta/src/core/diagnostics/redundant-parameter.lua b/server-beta/src/core/diagnostics/redundant-parameter.lua index 04012ef4..43bb93ed 100644 --- a/server-beta/src/core/diagnostics/redundant-parameter.lua +++ b/server-beta/src/core/diagnostics/redundant-parameter.lua @@ -3,7 +3,7 @@ local guide = require 'parser.guide' local searcher = require 'searcher' local lang = require 'language' local define = require 'proto.define' -local library = require 'library' +local await = require 'await' local function countLibraryArgs(source) local func = searcher.getLibrary(source) @@ -60,6 +60,10 @@ return function (uri, callback) return end + await.delay(function () + return files.globalVersion + end) + local func = source.node local funcArgs searcher.eachRef(func, function (info) diff --git a/server-beta/src/core/diagnostics/unused-function.lua b/server-beta/src/core/diagnostics/unused-function.lua index 0dd55906..eb6b8f7f 100644 --- a/server-beta/src/core/diagnostics/unused-function.lua +++ b/server-beta/src/core/diagnostics/unused-function.lua @@ -1,8 +1,9 @@ local files = require 'files' local guide = require 'parser.guide' local searcher = require 'searcher' -local define = require 'proto.define' -local lang = require 'language' +local define = require 'proto.define' +local lang = require 'language' +local await = require 'await' return function (uri, callback) local ast = files.getAst(uri) @@ -27,5 +28,8 @@ return function (uri, callback) message = lang.script.DIAG_UNUSED_FUNCTION, } end + await.delay(function () + return files.globalVersion + end) end) end |