diff --git a/changelog.md b/changelog.md index 3ded9f379beb0f26dbb3221dccf7aa8c1809c034..1a59789e52f2a6e78c69e1e56a4cc9128cec5568 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # changelog +## 3.6.24 +`2023-7-21` +* `NEW` diagnostic: `missing-fields` +* `FIX` shake of `codeLens` +* `FIX` [#2145] + +[#2145]: https://github.com/LuaLS/lua-language-server/issues/2145 + ## 3.6.23 `2023-7-7` * `CHG` signature: narrow by inputed literal diff --git a/package.json b/package.json index 75c26c0b308edc7c4ca76be0aa6d5f476dcf65f6..0158bbeaa746ea0888e034ba0f27755b946fb3a5 100644 --- a/package.json +++ b/package.json @@ -228,6 +228,7 @@ "miss-sep-in-table", "miss-space-between", "miss-symbol", + "missing-fields", "missing-global-doc", "missing-local-export-doc", "missing-parameter", @@ -987,6 +988,19 @@ ], "type": "string" }, + "missing-fields": { + "default": "Any", + "description": "%config.diagnostics.missing-fields%", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "missing-global-doc": { "default": "None", "description": "%config.diagnostics.missing-global-doc%", @@ -1826,6 +1840,21 @@ ], "type": "string" }, + "missing-fields": { + "default": "Warning", + "description": "%config.diagnostics.missing-fields%", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "missing-global-doc": { "default": "Warning", "description": "%config.diagnostics.missing-global-doc%", @@ -3283,5 +3312,5 @@ "sponsor": { "url": "https://github.com/LuaLS/lua-language-server/issues/484" }, - "version": "3.6.23" + "version": "3.6.24" } diff --git a/package.nls.json b/package.nls.json index 852216934408568f462f79f55d97f699a4e7f780..4849e94a03c394ba41490d5dc7a3e23a60c385f0 100644 --- a/package.nls.json +++ b/package.nls.json @@ -81,6 +81,7 @@ "config.diagnostics.libraryFiles.Opened": "Only when these files are opened will it be diagnosed.", "config.diagnostics.lowercase-global": "Enable lowercase global variable definition diagnostics.", "config.diagnostics.luadoc": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* incomplete-signature-doc\n* missing-global-doc\n* missing-local-export-doc\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator", + "config.diagnostics.missing-fields": "", "config.diagnostics.missing-global-doc": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", "config.diagnostics.missing-local-export-doc": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.", "config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -107,7 +108,7 @@ "config.diagnostics.strong": "* no-unknown", "config.diagnostics.trailing-space": "Enable trailing space diagnostics.", "config.diagnostics.type-check": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", - "config.diagnostics.unbalanced": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "config.diagnostics.unbalanced": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "config.diagnostics.unbalanced-assignments": "Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).", "config.diagnostics.undefined-doc-class": "Enable diagnostics for class annotations in which an undefined class is referenced.", "config.diagnostics.undefined-doc-name": "Enable diagnostics for type annotations referencing an undefined type or alias.", diff --git a/package.nls.pt-br.json b/package.nls.pt-br.json index 137a981a022c057ae89912de9af25fb3f17d47bc..abd060bb9bb002a1930e1b471fa0b7086b799161 100644 --- a/package.nls.pt-br.json +++ b/package.nls.pt-br.json @@ -81,6 +81,7 @@ "config.diagnostics.libraryFiles.Opened": "Only when these files are opened will it be diagnosed.", "config.diagnostics.lowercase-global": "首字母小写的全局变量定义", "config.diagnostics.luadoc": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* incomplete-signature-doc\n* missing-global-doc\n* missing-local-export-doc\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator", + "config.diagnostics.missing-fields": "", "config.diagnostics.missing-global-doc": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", "config.diagnostics.missing-local-export-doc": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.", "config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -107,7 +108,7 @@ "config.diagnostics.strong": "* no-unknown", "config.diagnostics.trailing-space": "后置空格", "config.diagnostics.type-check": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", - "config.diagnostics.unbalanced": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "config.diagnostics.unbalanced": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "config.diagnostics.unbalanced-assignments": "Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).", "config.diagnostics.undefined-doc-class": "Enable diagnostics for class annotations in which an undefined class is referenced.", "config.diagnostics.undefined-doc-name": "Enable diagnostics for type annotations referencing an undefined type or alias.", diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index 50c55945a656a3b57dd729e8cd45693c7e6e5bf4..853a2d8f8e59929d6861f2abbcfdf89b6f129da4 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -81,6 +81,7 @@ "config.diagnostics.libraryFiles.Opened": "只有打开这些文件时才会诊断。", "config.diagnostics.lowercase-global": "首字母小写的全局变量定义", "config.diagnostics.luadoc": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* incomplete-signature-doc\n* missing-global-doc\n* missing-local-export-doc\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator", + "config.diagnostics.missing-fields": "", "config.diagnostics.missing-global-doc": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", "config.diagnostics.missing-local-export-doc": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.", "config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -107,7 +108,7 @@ "config.diagnostics.strong": "* no-unknown", "config.diagnostics.trailing-space": "后置空格", "config.diagnostics.type-check": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", - "config.diagnostics.unbalanced": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "config.diagnostics.unbalanced": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "config.diagnostics.unbalanced-assignments": "Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).", "config.diagnostics.undefined-doc-class": "Enable diagnostics for class annotations in which an undefined class is referenced.", "config.diagnostics.undefined-doc-name": "Enable diagnostics for type annotations referencing an undefined type or alias.", diff --git a/package.nls.zh-tw.json b/package.nls.zh-tw.json index 57efb3c0b0f485716e6abdae6b0c54c3a0e40d5b..82d5f7e9779813bfb52f664b61097b80dfd09445 100644 --- a/package.nls.zh-tw.json +++ b/package.nls.zh-tw.json @@ -81,6 +81,7 @@ "config.diagnostics.libraryFiles.Opened": "只有打開這些檔案時才會診斷。", "config.diagnostics.lowercase-global": "首字母小寫的全域變數定義", "config.diagnostics.luadoc": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* incomplete-signature-doc\n* missing-global-doc\n* missing-local-export-doc\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator", + "config.diagnostics.missing-fields": "", "config.diagnostics.missing-global-doc": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", "config.diagnostics.missing-local-export-doc": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.", "config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -107,7 +108,7 @@ "config.diagnostics.strong": "* no-unknown", "config.diagnostics.trailing-space": "後置空格", "config.diagnostics.type-check": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", - "config.diagnostics.unbalanced": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "config.diagnostics.unbalanced": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "config.diagnostics.unbalanced-assignments": "Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).", "config.diagnostics.undefined-doc-class": "Enable diagnostics for class annotations in which an undefined class is referenced.", "config.diagnostics.undefined-doc-name": "Enable diagnostics for type annotations referencing an undefined type or alias.", diff --git a/package/build.lua b/package/build.lua index 5146ac0080616dc54afba7b2e44f4e4099d18bf7..590c0d9ff56ae38b999acde0474287a3488c8545 100644 --- a/package/build.lua +++ b/package/build.lua @@ -1,6 +1,6 @@ local json = require 'json-beautify' -local VERSION = "3.6.23" +local VERSION = "3.6.24" local package = require 'package.package' local fsu = require 'fs-utility' diff --git a/server b/server index dc15ea90474e63c5203e9504f44aeea0b08db99e..ecda29f02cc99304b254a7677c65aca8e8f457f3 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit dc15ea90474e63c5203e9504f44aeea0b08db99e +Subproject commit ecda29f02cc99304b254a7677c65aca8e8f457f3 diff --git a/setting/schema-pt-br.json b/setting/schema-pt-br.json index 6dcb7a3c9053ce0cbe3f2c31d8abedfcb6bc8c20..7cebe3ad3c91a1026a1f1322fd943ae93bfcdc79 100644 --- a/setting/schema-pt-br.json +++ b/setting/schema-pt-br.json @@ -282,6 +282,7 @@ "miss-sep-in-table", "miss-space-between", "miss-symbol", + "missing-fields", "missing-global-doc", "missing-local-export-doc", "missing-parameter", @@ -490,7 +491,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "enum": [ "Any", "Opened", @@ -653,7 +654,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "enum": [ "Error", "Warning", @@ -1041,6 +1042,19 @@ ], "type": "string" }, + "missing-fields": { + "default": "Any", + "description": "", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "missing-global-doc": { "default": "None", "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", @@ -1880,6 +1894,21 @@ ], "type": "string" }, + "missing-fields": { + "default": "Warning", + "description": "", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "missing-global-doc": { "default": "Warning", "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", diff --git a/setting/schema-zh-cn.json b/setting/schema-zh-cn.json index a57991cd78e539e7585ce9a0873067fbf8bc79eb..bfed12a970f333aee51afa88be84a4d9c1fb9001 100644 --- a/setting/schema-zh-cn.json +++ b/setting/schema-zh-cn.json @@ -282,6 +282,7 @@ "miss-sep-in-table", "miss-space-between", "miss-symbol", + "missing-fields", "missing-global-doc", "missing-local-export-doc", "missing-parameter", @@ -490,7 +491,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "enum": [ "Any", "Opened", @@ -653,7 +654,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "enum": [ "Error", "Warning", @@ -1041,6 +1042,19 @@ ], "type": "string" }, + "missing-fields": { + "default": "Any", + "description": "", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "missing-global-doc": { "default": "None", "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", @@ -1880,6 +1894,21 @@ ], "type": "string" }, + "missing-fields": { + "default": "Warning", + "description": "", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "missing-global-doc": { "default": "Warning", "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", diff --git a/setting/schema-zh-tw.json b/setting/schema-zh-tw.json index 0564ed474b5bb5e29a0ef3b5dd3c751b2b19d322..5a6faaf044c0a6ec02a99d689e195f4055bc5027 100644 --- a/setting/schema-zh-tw.json +++ b/setting/schema-zh-tw.json @@ -282,6 +282,7 @@ "miss-sep-in-table", "miss-space-between", "miss-symbol", + "missing-fields", "missing-global-doc", "missing-local-export-doc", "missing-parameter", @@ -490,7 +491,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "enum": [ "Any", "Opened", @@ -653,7 +654,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "enum": [ "Error", "Warning", @@ -1041,6 +1042,19 @@ ], "type": "string" }, + "missing-fields": { + "default": "Any", + "description": "", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "missing-global-doc": { "default": "None", "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", @@ -1880,6 +1894,21 @@ ], "type": "string" }, + "missing-fields": { + "default": "Warning", + "description": "", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "missing-global-doc": { "default": "Warning", "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", diff --git a/setting/schema.json b/setting/schema.json index 13d97b938d0f2f0bc440cc0b3ffcbb8188535a23..b5a89a556d5af339dea4a65dc717108a174a8c81 100644 --- a/setting/schema.json +++ b/setting/schema.json @@ -282,6 +282,7 @@ "miss-sep-in-table", "miss-space-between", "miss-symbol", + "missing-fields", "missing-global-doc", "missing-local-export-doc", "missing-parameter", @@ -490,7 +491,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "enum": [ "Any", "Opened", @@ -653,7 +654,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", "enum": [ "Error", "Warning", @@ -1041,6 +1042,19 @@ ], "type": "string" }, + "missing-fields": { + "default": "Any", + "description": "", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "missing-global-doc": { "default": "None", "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", @@ -1880,6 +1894,21 @@ ], "type": "string" }, + "missing-fields": { + "default": "Warning", + "description": "", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "missing-global-doc": { "default": "Warning", "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.",