diff --git a/doc/en-us/config.md b/doc/en-us/config.md index 719a4a6e5..584ab2d14 100644 --- a/doc/en-us/config.md +++ b/doc/en-us/config.md @@ -190,6 +190,7 @@ Array * ``"action-after-return"`` * ``"ambiguity-1"`` +* ``"ambiguous-syntax"`` * ``"args-after-dots"`` * ``"assign-type-mismatch"`` * ``"await-in-sync"`` @@ -654,26 +655,74 @@ object Enable ambiguous operator precedence diagnostics. For example, the `num or 0 + 1` expression will be suggested `(num or 0) + 1` instead. */ "ambiguity-1": "Any", + /* + Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable. + */ "assign-type-mismatch": "Opened", + /* + Enable diagnostics for calls of asynchronous functions within a synchronous function. + */ "await-in-sync": "None", + /* + Enable diagnostics for casts of local variables where the target type does not match the defined type. + */ "cast-local-type": "Opened", + /* + Enable diagnostics for casts where the target type does not match the initial type. + */ "cast-type-mismatch": "Opened", "circle-doc-class": "Any", + /* + Enable diagnostics for attempts to close a variable with a non-object. + */ "close-non-object": "Any", + /* + Enable diagnostics for code placed after a break statement in a loop. + */ "code-after-break": "Opened", + /* + Enable diagnostics for incorrectly styled lines. + */ "codestyle-check": "None", + /* + Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing. + */ "count-down-loop": "Any", + /* + Enable diagnostics to highlight deprecated API. + */ "deprecated": "Any", + /* + Enable diagnostics for files which are required by two different paths. + */ "different-requires": "Any", + /* + Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored. + */ "discard-returns": "Any", + /* + Enable diagnostics to highlight a field annotation without a defining class annotation. + */ "doc-field-no-class": "Any", + /* + Enable diagnostics for a duplicated alias annotation name. + */ "duplicate-doc-alias": "Any", + /* + Enable diagnostics for a duplicated field annotation name. + */ "duplicate-doc-field": "Any", + /* + Enable diagnostics for a duplicated param annotation name. + */ "duplicate-doc-param": "Any", /* Enable duplicate table index diagnostics. */ "duplicate-index": "Any", + /* + Enable diagnostics for setting the same field in a class more than once. + */ "duplicate-set-field": "Any", /* Enable empty code block diagnostics. @@ -687,9 +736,21 @@ object Enable lowercase global variable definition diagnostics. */ "lowercase-global": "Any", + /* + Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters. + */ "missing-parameter": "Any", + /* + Enable diagnostics for functions with return annotations which have no return statement. + */ "missing-return": "Any", + /* + Enable diagnostics for return statements without values although the containing function declares returns. + */ "missing-return-value": "Any", + /* + Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before. + */ "need-check-nil": "Opened", /* Enable newfield call diagnostics. It is raised when the parenthesis of a function call appear on the following line when defining a field in a table. @@ -699,8 +760,17 @@ object Enable newline call diagnostics. Is's raised when a line starting with `(` is encountered, which is syntactically parsed as a function call on the previous line. */ "newline-call": "Any", + /* + Enable diagnostics for cases in which the type cannot be inferred. + */ "no-unknown": "None", + /* + Enable diagnostics for calls to `coroutine.yield()` when it is not permitted. + */ "not-yieldable": "None", + /* + Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition. + */ "param-type-mismatch": "Opened", /* Enable redefined local variable diagnostics. @@ -710,34 +780,73 @@ object Enable redundant function parameter diagnostics. */ "redundant-parameter": "Any", + /* + Enable diagnostics for return statements which are not needed because the function would exit on its own. + */ "redundant-return": "Opened", + /* + Enable diagnostics for return statements which return an extra value which is not specified by a return annotation. + */ "redundant-return-value": "Any", /* Enable the redundant values assigned diagnostics. It's raised during assignment operation, when the number of values is higher than the number of objects being assigned. */ "redundant-value": "Any", + /* + Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation. + */ "return-type-mismatch": "Opened", + /* + Enable diagnostics for typos in strings. + */ "spell-check": "None", /* Enable trailing space diagnostics. */ "trailing-space": "Opened", + /* + Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`). + */ "unbalanced-assignments": "Any", + /* + Enable diagnostics for class annotations in which an undefined class is referenced. + */ "undefined-doc-class": "Any", + /* + Enable diagnostics for type annotations referencing an undefined type or alias. + */ "undefined-doc-name": "Any", + /* + Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition. + */ "undefined-doc-param": "Any", /* Enable undefined environment variable diagnostics. It's raised when `_ENV` table is set to a new literal table, but the used global variable is no longer present in the global environment. */ "undefined-env-child": "Any", + /* + Enable diagnostics for cases in which an undefined field of a variable is read. + */ "undefined-field": "Opened", /* Enable undefined global variable diagnostics. */ "undefined-global": "Any", + /* + Enable diagnostics for casts of undefined variables. + */ "unknown-cast-variable": "Any", + /* + Enable diagnostics in cases in which an unknown diagnostics code is entered. + */ "unknown-diag-code": "Any", + /* + Enable diagnostics for unknown operators. + */ "unknown-operator": "Any", + /* + Enable diagnostics for unreachable code. + */ "unreachable-code": "Opened", /* Enable unused function diagnostics. @@ -790,26 +899,74 @@ object Enable ambiguous operator precedence diagnostics. For example, the `num or 0 + 1` expression will be suggested `(num or 0) + 1` instead. */ "ambiguity-1": "Warning", + /* + Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable. + */ "assign-type-mismatch": "Warning", + /* + Enable diagnostics for calls of asynchronous functions within a synchronous function. + */ "await-in-sync": "Warning", + /* + Enable diagnostics for casts of local variables where the target type does not match the defined type. + */ "cast-local-type": "Warning", + /* + Enable diagnostics for casts where the target type does not match the initial type. + */ "cast-type-mismatch": "Warning", "circle-doc-class": "Warning", + /* + Enable diagnostics for attempts to close a variable with a non-object. + */ "close-non-object": "Warning", + /* + Enable diagnostics for code placed after a break statement in a loop. + */ "code-after-break": "Hint", + /* + Enable diagnostics for incorrectly styled lines. + */ "codestyle-check": "Warning", + /* + Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing. + */ "count-down-loop": "Warning", + /* + Enable diagnostics to highlight deprecated API. + */ "deprecated": "Warning", + /* + Enable diagnostics for files which are required by two different paths. + */ "different-requires": "Warning", + /* + Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored. + */ "discard-returns": "Warning", + /* + Enable diagnostics to highlight a field annotation without a defining class annotation. + */ "doc-field-no-class": "Warning", + /* + Enable diagnostics for a duplicated alias annotation name. + */ "duplicate-doc-alias": "Warning", + /* + Enable diagnostics for a duplicated field annotation name. + */ "duplicate-doc-field": "Warning", + /* + Enable diagnostics for a duplicated param annotation name. + */ "duplicate-doc-param": "Warning", /* Enable duplicate table index diagnostics. */ "duplicate-index": "Warning", + /* + Enable diagnostics for setting the same field in a class more than once. + */ "duplicate-set-field": "Warning", /* Enable empty code block diagnostics. @@ -823,9 +980,21 @@ object Enable lowercase global variable definition diagnostics. */ "lowercase-global": "Information", + /* + Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters. + */ "missing-parameter": "Warning", + /* + Enable diagnostics for functions with return annotations which have no return statement. + */ "missing-return": "Warning", + /* + Enable diagnostics for return statements without values although the containing function declares returns. + */ "missing-return-value": "Warning", + /* + Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before. + */ "need-check-nil": "Warning", /* Enable newfield call diagnostics. It is raised when the parenthesis of a function call appear on the following line when defining a field in a table. @@ -835,8 +1004,17 @@ object Enable newline call diagnostics. Is's raised when a line starting with `(` is encountered, which is syntactically parsed as a function call on the previous line. */ "newline-call": "Warning", + /* + Enable diagnostics for cases in which the type cannot be inferred. + */ "no-unknown": "Warning", + /* + Enable diagnostics for calls to `coroutine.yield()` when it is not permitted. + */ "not-yieldable": "Warning", + /* + Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition. + */ "param-type-mismatch": "Warning", /* Enable redefined local variable diagnostics. @@ -846,34 +1024,73 @@ object Enable redundant function parameter diagnostics. */ "redundant-parameter": "Warning", + /* + Enable diagnostics for return statements which are not needed because the function would exit on its own. + */ "redundant-return": "Hint", + /* + Enable diagnostics for return statements which return an extra value which is not specified by a return annotation. + */ "redundant-return-value": "Warning", /* Enable the redundant values assigned diagnostics. It's raised during assignment operation, when the number of values is higher than the number of objects being assigned. */ "redundant-value": "Warning", + /* + Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation. + */ "return-type-mismatch": "Warning", + /* + Enable diagnostics for typos in strings. + */ "spell-check": "Information", /* Enable trailing space diagnostics. */ "trailing-space": "Hint", + /* + Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`). + */ "unbalanced-assignments": "Warning", + /* + Enable diagnostics for class annotations in which an undefined class is referenced. + */ "undefined-doc-class": "Warning", + /* + Enable diagnostics for type annotations referencing an undefined type or alias. + */ "undefined-doc-name": "Warning", + /* + Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition. + */ "undefined-doc-param": "Warning", /* Enable undefined environment variable diagnostics. It's raised when `_ENV` table is set to a new literal table, but the used global variable is no longer present in the global environment. */ "undefined-env-child": "Information", + /* + Enable diagnostics for cases in which an undefined field of a variable is read. + */ "undefined-field": "Warning", /* Enable undefined global variable diagnostics. */ "undefined-global": "Warning", + /* + Enable diagnostics for casts of undefined variables. + */ "unknown-cast-variable": "Warning", + /* + Enable diagnostics in cases in which an unknown diagnostics code is entered. + */ "unknown-diag-code": "Warning", + /* + Enable diagnostics for unknown operators. + */ "unknown-operator": "Warning", + /* + Enable diagnostics for unreachable code. + */ "unreachable-code": "Hint", /* Enable unused function diagnostics. diff --git a/doc/pt-br/config.md b/doc/pt-br/config.md index ddd613fb5..e984f1721 100644 --- a/doc/pt-br/config.md +++ b/doc/pt-br/config.md @@ -190,6 +190,7 @@ Array * ``"action-after-return"`` * ``"ambiguity-1"`` +* ``"ambiguous-syntax"`` * ``"args-after-dots"`` * ``"assign-type-mismatch"`` * ``"await-in-sync"`` diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index 07d07a743..00739179c 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -190,6 +190,7 @@ Array * ``"action-after-return"`` * ``"ambiguity-1"`` +* ``"ambiguous-syntax"`` * ``"args-after-dots"`` * ``"assign-type-mismatch"`` * ``"await-in-sync"`` diff --git a/doc/zh-tw/config.md b/doc/zh-tw/config.md index 08fab32b9..95a030114 100644 --- a/doc/zh-tw/config.md +++ b/doc/zh-tw/config.md @@ -190,6 +190,7 @@ Array * ``"action-after-return"`` * ``"ambiguity-1"`` +* ``"ambiguous-syntax"`` * ``"args-after-dots"`` * ``"assign-type-mismatch"`` * ``"await-in-sync"`` diff --git a/locale/en-us/setting.lua b/locale/en-us/setting.lua index 112640c02..fd6b069fb 100644 --- a/locale/en-us/setting.lua +++ b/locale/en-us/setting.lua @@ -319,3 +319,77 @@ config.diagnostics['empty-block'] = 'Enable empty code block diagnostics.' config.diagnostics['redundant-value'] = 'Enable the redundant values assigned diagnostics. It\'s raised during assignment operation, when the number of values is higher than the number of objects being assigned.' +config.diagnostics['assign-type-mismatch'] = +'Enable diagnostics for assignments in which the value\'s type does not match the type of the assigned variable.' +config.diagnostics['await-in-sync'] = +'Enable diagnostics for calls of asynchronous functions within a synchronous function.' +config.diagnostics['cast-local-type'] = +'Enable diagnostics for casts of local variables where the target type does not match the defined type.' +config.diagnostics['cast-type-mismatch'] = +'Enable diagnostics for casts where the target type does not match the initial type.' +config.diagnostics['circular-doc-class'] = +'Enable diagnostics for two classes inheriting from each other introducing a circular relation.' +config.diagnostics['close-non-object'] = +'Enable diagnostics for attempts to close a variable with a non-object.' +config.diagnostics['code-after-break'] = +'Enable diagnostics for code placed after a break statement in a loop.' +config.diagnostics['codestyle-check'] = +'Enable diagnostics for incorrectly styled lines.' +config.diagnostics['count-down-loop'] = +'Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.' +config.diagnostics['deprecated'] = +'Enable diagnostics to highlight deprecated API.' +config.diagnostics['different-requires'] = +'Enable diagnostics for files which are required by two different paths.' +config.diagnostics['discard-returns'] = +'Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.' +config.diagnostics['doc-field-no-class'] = +'Enable diagnostics to highlight a field annotation without a defining class annotation.' +config.diagnostics['duplicate-doc-alias'] = +'Enable diagnostics for a duplicated alias annotation name.' +config.diagnostics['duplicate-doc-field'] = +'Enable diagnostics for a duplicated field annotation name.' +config.diagnostics['duplicate-doc-param'] = +'Enable diagnostics for a duplicated param annotation name.' +config.diagnostics['duplicate-set-field'] = +'Enable diagnostics for setting the same field in a class more than once.' +config.diagnostics['missing-parameter'] = +'Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.' +config.diagnostics['missing-return'] = +'Enable diagnostics for functions with return annotations which have no return statement.' +config.diagnostics['missing-return-value'] = +'Enable diagnostics for return statements without values although the containing function declares returns.' +config.diagnostics['need-check-nil'] = +'Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.' +config.diagnostics['no-unknown'] = +'Enable diagnostics for cases in which the type cannot be inferred.' +config.diagnostics['not-yieldable'] = +'Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.' +config.diagnostics['param-type-mismatch'] = +'Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.' +config.diagnostics['redundant-return'] = +'Enable diagnostics for return statements which are not needed because the function would exit on its own.' +config.diagnostics['redundant-return-value']= +'Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.' +config.diagnostics['return-type-mismatch'] = +'Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.' +config.diagnostics['spell-check'] = +'Enable diagnostics for typos in strings.' +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.' +config.diagnostics['undefined-doc-param'] = +'Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.' +config.diagnostics['undefined-field'] = +'Enable diagnostics for cases in which an undefined field of a variable is read.' +config.diagnostics['unknown-cast-variable'] = +'Enable diagnostics for casts of undefined variables.' +config.diagnostics['unknown-diag-code'] = +'Enable diagnostics in cases in which an unknown diagnostics code is entered.' +config.diagnostics['unknown-operator'] = +'Enable diagnostics for unknown operators.' +config.diagnostics['unreachable-code'] = +'Enable diagnostics for unreachable code.' diff --git a/locale/pt-br/setting.lua b/locale/pt-br/setting.lua index 79c3770be..9f597ca6f 100644 --- a/locale/pt-br/setting.lua +++ b/locale/pt-br/setting.lua @@ -319,3 +319,77 @@ config.diagnostics['empty-block'] = -- TODO: need translate! '空代码块' config.diagnostics['redundant-value'] = -- TODO: need translate! '赋值操作时,值的数量比被赋值的对象多' +config.diagnostics['assign-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for assignments in which the value\'s type does not match the type of the assigned variable.' +config.diagnostics['await-in-sync'] = -- TODO: need translate! +'Enable diagnostics for calls of asynchronous functions within a synchronous function.' +config.diagnostics['cast-local-type'] = -- TODO: need translate! +'Enable diagnostics for casts of local variables where the target type does not match the defined type.' +config.diagnostics['cast-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for casts where the target type does not match the initial type.' +config.diagnostics['circular-doc-class'] = -- TODO: need translate! +'Enable diagnostics for two classes inheriting from each other introducing a circular relation.' +config.diagnostics['close-non-object'] = -- TODO: need translate! +'Enable diagnostics for attempts to close a variable with a non-object.' +config.diagnostics['code-after-break'] = -- TODO: need translate! +'Enable diagnostics for code placed after a break statement in a loop.' +config.diagnostics['codestyle-check'] = -- TODO: need translate! +'Enable diagnostics for incorrectly styled lines.' +config.diagnostics['count-down-loop'] = -- TODO: need translate! +'Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.' +config.diagnostics['deprecated'] = -- TODO: need translate! +'Enable diagnostics to highlight deprecated API.' +config.diagnostics['different-requires'] = -- TODO: need translate! +'Enable diagnostics for files which are required by two different paths.' +config.diagnostics['discard-returns'] = -- TODO: need translate! +'Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.' +config.diagnostics['doc-field-no-class'] = -- TODO: need translate! +'Enable diagnostics to highlight a field annotation without a defining class annotation.' +config.diagnostics['duplicate-doc-alias'] = -- TODO: need translate! +'Enable diagnostics for a duplicated alias annotation name.' +config.diagnostics['duplicate-doc-field'] = -- TODO: need translate! +'Enable diagnostics for a duplicated field annotation name.' +config.diagnostics['duplicate-doc-param'] = -- TODO: need translate! +'Enable diagnostics for a duplicated param annotation name.' +config.diagnostics['duplicate-set-field'] = -- TODO: need translate! +'Enable diagnostics for setting the same field in a class more than once.' +config.diagnostics['missing-parameter'] = -- TODO: need translate! +'Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.' +config.diagnostics['missing-return'] = -- TODO: need translate! +'Enable diagnostics for functions with return annotations which have no return statement.' +config.diagnostics['missing-return-value'] = -- TODO: need translate! +'Enable diagnostics for return statements without values although the containing function declares returns.' +config.diagnostics['need-check-nil'] = -- TODO: need translate! +'Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.' +config.diagnostics['no-unknown'] = -- TODO: need translate! +'Enable diagnostics for cases in which the type cannot be inferred.' +config.diagnostics['not-yieldable'] = -- TODO: need translate! +'Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.' +config.diagnostics['param-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.' +config.diagnostics['redundant-return'] = -- TODO: need translate! +'Enable diagnostics for return statements which are not needed because the function would exit on its own.' +config.diagnostics['redundant-return-value']= -- TODO: need translate! +'Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.' +config.diagnostics['return-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.' +config.diagnostics['spell-check'] = -- TODO: need translate! +'Enable diagnostics for typos in strings.' +config.diagnostics['unbalanced-assignments']= -- TODO: need translate! +'Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).' +config.diagnostics['undefined-doc-class'] = -- TODO: need translate! +'Enable diagnostics for class annotations in which an undefined class is referenced.' +config.diagnostics['undefined-doc-name'] = -- TODO: need translate! +'Enable diagnostics for type annotations referencing an undefined type or alias.' +config.diagnostics['undefined-doc-param'] = -- TODO: need translate! +'Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.' +config.diagnostics['undefined-field'] = -- TODO: need translate! +'Enable diagnostics for cases in which an undefined field of a variable is read.' +config.diagnostics['unknown-cast-variable'] = -- TODO: need translate! +'Enable diagnostics for casts of undefined variables.' +config.diagnostics['unknown-diag-code'] = -- TODO: need translate! +'Enable diagnostics in cases in which an unknown diagnostics code is entered.' +config.diagnostics['unknown-operator'] = -- TODO: need translate! +'Enable diagnostics for unknown operators.' +config.diagnostics['unreachable-code'] = -- TODO: need translate! +'Enable diagnostics for unreachable code.' diff --git a/locale/zh-cn/setting.lua b/locale/zh-cn/setting.lua index baa3a92f8..dde3e9d12 100644 --- a/locale/zh-cn/setting.lua +++ b/locale/zh-cn/setting.lua @@ -318,3 +318,77 @@ config.diagnostics['empty-block'] = '空代码块' config.diagnostics['redundant-value'] = '赋值操作时,值的数量比被赋值的对象多' +config.diagnostics['assign-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for assignments in which the value\'s type does not match the type of the assigned variable.' +config.diagnostics['await-in-sync'] = -- TODO: need translate! +'Enable diagnostics for calls of asynchronous functions within a synchronous function.' +config.diagnostics['cast-local-type'] = -- TODO: need translate! +'Enable diagnostics for casts of local variables where the target type does not match the defined type.' +config.diagnostics['cast-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for casts where the target type does not match the initial type.' +config.diagnostics['circular-doc-class'] = -- TODO: need translate! +'Enable diagnostics for two classes inheriting from each other introducing a circular relation.' +config.diagnostics['close-non-object'] = -- TODO: need translate! +'Enable diagnostics for attempts to close a variable with a non-object.' +config.diagnostics['code-after-break'] = -- TODO: need translate! +'Enable diagnostics for code placed after a break statement in a loop.' +config.diagnostics['codestyle-check'] = -- TODO: need translate! +'Enable diagnostics for incorrectly styled lines.' +config.diagnostics['count-down-loop'] = -- TODO: need translate! +'Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.' +config.diagnostics['deprecated'] = -- TODO: need translate! +'Enable diagnostics to highlight deprecated API.' +config.diagnostics['different-requires'] = -- TODO: need translate! +'Enable diagnostics for files which are required by two different paths.' +config.diagnostics['discard-returns'] = -- TODO: need translate! +'Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.' +config.diagnostics['doc-field-no-class'] = -- TODO: need translate! +'Enable diagnostics to highlight a field annotation without a defining class annotation.' +config.diagnostics['duplicate-doc-alias'] = -- TODO: need translate! +'Enable diagnostics for a duplicated alias annotation name.' +config.diagnostics['duplicate-doc-field'] = -- TODO: need translate! +'Enable diagnostics for a duplicated field annotation name.' +config.diagnostics['duplicate-doc-param'] = -- TODO: need translate! +'Enable diagnostics for a duplicated param annotation name.' +config.diagnostics['duplicate-set-field'] = -- TODO: need translate! +'Enable diagnostics for setting the same field in a class more than once.' +config.diagnostics['missing-parameter'] = -- TODO: need translate! +'Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.' +config.diagnostics['missing-return'] = -- TODO: need translate! +'Enable diagnostics for functions with return annotations which have no return statement.' +config.diagnostics['missing-return-value'] = -- TODO: need translate! +'Enable diagnostics for return statements without values although the containing function declares returns.' +config.diagnostics['need-check-nil'] = -- TODO: need translate! +'Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.' +config.diagnostics['no-unknown'] = -- TODO: need translate! +'Enable diagnostics for cases in which the type cannot be inferred.' +config.diagnostics['not-yieldable'] = -- TODO: need translate! +'Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.' +config.diagnostics['param-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.' +config.diagnostics['redundant-return'] = -- TODO: need translate! +'Enable diagnostics for return statements which are not needed because the function would exit on its own.' +config.diagnostics['redundant-return-value']= -- TODO: need translate! +'Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.' +config.diagnostics['return-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.' +config.diagnostics['spell-check'] = -- TODO: need translate! +'Enable diagnostics for typos in strings.' +config.diagnostics['unbalanced-assignments']= -- TODO: need translate! +'Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).' +config.diagnostics['undefined-doc-class'] = -- TODO: need translate! +'Enable diagnostics for class annotations in which an undefined class is referenced.' +config.diagnostics['undefined-doc-name'] = -- TODO: need translate! +'Enable diagnostics for type annotations referencing an undefined type or alias.' +config.diagnostics['undefined-doc-param'] = -- TODO: need translate! +'Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.' +config.diagnostics['undefined-field'] = -- TODO: need translate! +'Enable diagnostics for cases in which an undefined field of a variable is read.' +config.diagnostics['unknown-cast-variable'] = -- TODO: need translate! +'Enable diagnostics for casts of undefined variables.' +config.diagnostics['unknown-diag-code'] = -- TODO: need translate! +'Enable diagnostics in cases in which an unknown diagnostics code is entered.' +config.diagnostics['unknown-operator'] = -- TODO: need translate! +'Enable diagnostics for unknown operators.' +config.diagnostics['unreachable-code'] = -- TODO: need translate! +'Enable diagnostics for unreachable code.' diff --git a/locale/zh-tw/setting.lua b/locale/zh-tw/setting.lua index 37269484d..3129b3138 100644 --- a/locale/zh-tw/setting.lua +++ b/locale/zh-tw/setting.lua @@ -318,3 +318,77 @@ config.diagnostics['empty-block'] = '空程式碼區塊' config.diagnostics['redundant-value'] = '賦值操作時,值的數量比被賦值的對象多' +config.diagnostics['assign-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for assignments in which the value\'s type does not match the type of the assigned variable.' +config.diagnostics['await-in-sync'] = -- TODO: need translate! +'Enable diagnostics for calls of asynchronous functions within a synchronous function.' +config.diagnostics['cast-local-type'] = -- TODO: need translate! +'Enable diagnostics for casts of local variables where the target type does not match the defined type.' +config.diagnostics['cast-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for casts where the target type does not match the initial type.' +config.diagnostics['circular-doc-class'] = -- TODO: need translate! +'Enable diagnostics for two classes inheriting from each other introducing a circular relation.' +config.diagnostics['close-non-object'] = -- TODO: need translate! +'Enable diagnostics for attempts to close a variable with a non-object.' +config.diagnostics['code-after-break'] = -- TODO: need translate! +'Enable diagnostics for code placed after a break statement in a loop.' +config.diagnostics['codestyle-check'] = -- TODO: need translate! +'Enable diagnostics for incorrectly styled lines.' +config.diagnostics['count-down-loop'] = -- TODO: need translate! +'Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.' +config.diagnostics['deprecated'] = -- TODO: need translate! +'Enable diagnostics to highlight deprecated API.' +config.diagnostics['different-requires'] = -- TODO: need translate! +'Enable diagnostics for files which are required by two different paths.' +config.diagnostics['discard-returns'] = -- TODO: need translate! +'Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.' +config.diagnostics['doc-field-no-class'] = -- TODO: need translate! +'Enable diagnostics to highlight a field annotation without a defining class annotation.' +config.diagnostics['duplicate-doc-alias'] = -- TODO: need translate! +'Enable diagnostics for a duplicated alias annotation name.' +config.diagnostics['duplicate-doc-field'] = -- TODO: need translate! +'Enable diagnostics for a duplicated field annotation name.' +config.diagnostics['duplicate-doc-param'] = -- TODO: need translate! +'Enable diagnostics for a duplicated param annotation name.' +config.diagnostics['duplicate-set-field'] = -- TODO: need translate! +'Enable diagnostics for setting the same field in a class more than once.' +config.diagnostics['missing-parameter'] = -- TODO: need translate! +'Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.' +config.diagnostics['missing-return'] = -- TODO: need translate! +'Enable diagnostics for functions with return annotations which have no return statement.' +config.diagnostics['missing-return-value'] = -- TODO: need translate! +'Enable diagnostics for return statements without values although the containing function declares returns.' +config.diagnostics['need-check-nil'] = -- TODO: need translate! +'Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.' +config.diagnostics['no-unknown'] = -- TODO: need translate! +'Enable diagnostics for cases in which the type cannot be inferred.' +config.diagnostics['not-yieldable'] = -- TODO: need translate! +'Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.' +config.diagnostics['param-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.' +config.diagnostics['redundant-return'] = -- TODO: need translate! +'Enable diagnostics for return statements which are not needed because the function would exit on its own.' +config.diagnostics['redundant-return-value']= -- TODO: need translate! +'Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.' +config.diagnostics['return-type-mismatch'] = -- TODO: need translate! +'Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.' +config.diagnostics['spell-check'] = -- TODO: need translate! +'Enable diagnostics for typos in strings.' +config.diagnostics['unbalanced-assignments']= -- TODO: need translate! +'Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).' +config.diagnostics['undefined-doc-class'] = -- TODO: need translate! +'Enable diagnostics for class annotations in which an undefined class is referenced.' +config.diagnostics['undefined-doc-name'] = -- TODO: need translate! +'Enable diagnostics for type annotations referencing an undefined type or alias.' +config.diagnostics['undefined-doc-param'] = -- TODO: need translate! +'Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.' +config.diagnostics['undefined-field'] = -- TODO: need translate! +'Enable diagnostics for cases in which an undefined field of a variable is read.' +config.diagnostics['unknown-cast-variable'] = -- TODO: need translate! +'Enable diagnostics for casts of undefined variables.' +config.diagnostics['unknown-diag-code'] = -- TODO: need translate! +'Enable diagnostics in cases in which an unknown diagnostics code is entered.' +config.diagnostics['unknown-operator'] = -- TODO: need translate! +'Enable diagnostics for unknown operators.' +config.diagnostics['unreachable-code'] = -- TODO: need translate! +'Enable diagnostics for unreachable code.'