diff options
-rw-r--r-- | doc/en-us/config.md | 160 | ||||
-rw-r--r-- | doc/pt-br/config.md | 160 | ||||
-rw-r--r-- | doc/zh-cn/config.md | 160 | ||||
-rw-r--r-- | doc/zh-tw/config.md | 160 | ||||
-rw-r--r-- | script/config/template.lua | 2 | ||||
-rw-r--r-- | script/utility.lua | 4 |
6 files changed, 324 insertions, 322 deletions
diff --git a/doc/en-us/config.md b/doc/en-us/config.md index 137793cc..e854ed51 100644 --- a/doc/en-us/config.md +++ b/doc/en-us/config.md @@ -188,101 +188,101 @@ Array<string> ## enum -* ``"not-yieldable"`` -* ``"redundant-parameter"`` +* ``"action-after-return"`` +* ``"ambiguity-1"`` +* ``"args-after-dots"`` +* ``"assign-type-mismatch"`` +* ``"await-in-sync"`` +* ``"block-after-else"`` * ``"break-outside"`` -* ``"undefined-doc-class"`` -* ``"unknown-symbol"`` -* ``"miss-method"`` -* ``"err-nonstandard-symbol"`` -* ``"unknown-attribute"`` -* ``"unexpect-efunc-name"`` +* ``"cast-local-type"`` +* ``"cast-type-mismatch"`` +* ``"circle-doc-class"`` +* ``"close-non-object"`` +* ``"code-after-break"`` +* ``"codestyle-check"`` +* ``"count-down-loop"`` +* ``"deprecated"`` * ``"different-requires"`` -* ``"miss-end"`` -* ``"await-in-sync"`` -* ``"args-after-dots"`` -* ``"err-eq-as-assign"`` -* ``"newfield-call"`` +* ``"discard-returns"`` +* ``"doc-field-no-class"`` +* ``"duplicate-doc-alias"`` +* ``"duplicate-doc-field"`` +* ``"duplicate-doc-param"`` +* ``"duplicate-index"`` +* ``"duplicate-set-field"`` +* ``"empty-block"`` * ``"err-assign-as-eq"`` -* ``"undefined-doc-param"`` -* ``"undefined-global"`` +* ``"err-c-long-comment"`` +* ``"err-comment-prefix"`` +* ``"err-do-as-then"`` +* ``"err-eq-as-assign"`` +* ``"err-esc"`` +* ``"err-nonstandard-symbol"`` +* ``"err-then-as-do"`` +* ``"exp-in-action"`` * ``"global-in-nil-env"`` -* ``"redundant-return-value"`` -* ``"miss-sep-in-table"`` -* ``"unknown-cast-variable"`` -* ``"unknown-operator"`` +* ``"index-in-func-name"`` +* ``"jump-local-scope"`` +* ``"keyword"`` +* ``"local-limit"`` +* ``"lowercase-global"`` * ``"malformed-number"`` -* ``"err-do-as-then"`` -* ``"spell-check"`` -* ``"undefined-env-child"`` -* ``"missing-return-value"`` -* ``"discard-returns"`` -* ``"redundant-return"`` +* ``"miss-end"`` * ``"miss-esc-x"`` -* ``"redundant-value"`` -* ``"duplicate-doc-alias"`` -* ``"doc-field-no-class"`` -* ``"miss-loop-min"`` -* ``"no-visible-label"`` -* ``"miss-loop-max"`` * ``"miss-exp"`` -* ``"unicode-name"`` +* ``"miss-exponent"`` +* ``"miss-field"`` +* ``"miss-loop-max"`` +* ``"miss-loop-min"`` +* ``"miss-method"`` * ``"miss-name"`` -* ``"empty-block"`` -* ``"err-then-as-do"`` -* ``"redefined-label"`` -* ``"duplicate-doc-field"`` -* ``"exp-in-action"`` -* ``"set-const"`` -* ``"unexpect-lfunc-name"`` -* ``"circle-doc-class"`` -* ``"action-after-return"`` +* ``"miss-sep-in-table"`` * ``"miss-space-between"`` -* ``"unused-label"`` -* ``"unexpect-dots"`` -* ``"duplicate-index"`` -* ``"miss-field"`` -* ``"jump-local-scope"`` -* ``"close-non-object"`` -* ``"unexpect-symbol"`` -* ``"count-down-loop"`` -* ``"cast-type-mismatch"`` -* ``"newline-call"`` +* ``"miss-symbol"`` * ``"missing-parameter"`` -* ``"block-after-else"`` -* ``"miss-exponent"`` -* ``"err-esc"`` -* ``"local-limit"`` -* ``"unsupport-symbol"`` -* ``"trailing-space"`` -* ``"err-c-long-comment"`` -* ``"unbalanced-assignments"`` -* ``"duplicate-doc-param"`` -* ``"ambiguity-1"`` -* ``"deprecated"`` -* ``"codestyle-check"`` * ``"missing-return"`` -* ``"code-after-break"`` -* ``"unused-function"`` -* ``"cast-local-type"`` -* ``"assign-type-mismatch"`` -* ``"duplicate-set-field"`` -* ``"unused-vararg"`` +* ``"missing-return-value"`` * ``"need-check-nil"`` -* ``"keyword"`` -* ``"unused-local"`` -* ``"unknown-diag-code"`` -* ``"err-comment-prefix"`` -* ``"lowercase-global"`` -* ``"redefined-local"`` -* ``"undefined-doc-name"`` +* ``"newfield-call"`` +* ``"newline-call"`` * ``"no-unknown"`` -* ``"unreachable-code"`` +* ``"no-visible-label"`` +* ``"not-yieldable"`` * ``"param-type-mismatch"`` -* ``"index-in-func-name"`` -* ``"miss-symbol"`` -* ``"undefined-field"`` +* ``"redefined-label"`` +* ``"redefined-local"`` +* ``"redundant-parameter"`` +* ``"redundant-return"`` +* ``"redundant-return-value"`` +* ``"redundant-value"`` * ``"return-type-mismatch"`` +* ``"set-const"`` +* ``"spell-check"`` +* ``"trailing-space"`` +* ``"unbalanced-assignments"`` +* ``"undefined-doc-class"`` +* ``"undefined-doc-name"`` +* ``"undefined-doc-param"`` +* ``"undefined-env-child"`` +* ``"undefined-field"`` +* ``"undefined-global"`` +* ``"unexpect-dots"`` +* ``"unexpect-efunc-name"`` +* ``"unexpect-lfunc-name"`` +* ``"unexpect-symbol"`` +* ``"unicode-name"`` +* ``"unknown-attribute"`` +* ``"unknown-cast-variable"`` +* ``"unknown-diag-code"`` +* ``"unknown-operator"`` +* ``"unknown-symbol"`` +* ``"unreachable-code"`` +* ``"unsupport-symbol"`` +* ``"unused-function"`` +* ``"unused-label"`` +* ``"unused-local"`` +* ``"unused-vararg"`` ## default diff --git a/doc/pt-br/config.md b/doc/pt-br/config.md index 97a01630..60e04f72 100644 --- a/doc/pt-br/config.md +++ b/doc/pt-br/config.md @@ -188,101 +188,101 @@ Array<string> ## enum -* ``"not-yieldable"`` -* ``"redundant-parameter"`` +* ``"action-after-return"`` +* ``"ambiguity-1"`` +* ``"args-after-dots"`` +* ``"assign-type-mismatch"`` +* ``"await-in-sync"`` +* ``"block-after-else"`` * ``"break-outside"`` -* ``"undefined-doc-class"`` -* ``"unknown-symbol"`` -* ``"miss-method"`` -* ``"err-nonstandard-symbol"`` -* ``"unknown-attribute"`` -* ``"unexpect-efunc-name"`` +* ``"cast-local-type"`` +* ``"cast-type-mismatch"`` +* ``"circle-doc-class"`` +* ``"close-non-object"`` +* ``"code-after-break"`` +* ``"codestyle-check"`` +* ``"count-down-loop"`` +* ``"deprecated"`` * ``"different-requires"`` -* ``"miss-end"`` -* ``"await-in-sync"`` -* ``"args-after-dots"`` -* ``"err-eq-as-assign"`` -* ``"newfield-call"`` +* ``"discard-returns"`` +* ``"doc-field-no-class"`` +* ``"duplicate-doc-alias"`` +* ``"duplicate-doc-field"`` +* ``"duplicate-doc-param"`` +* ``"duplicate-index"`` +* ``"duplicate-set-field"`` +* ``"empty-block"`` * ``"err-assign-as-eq"`` -* ``"undefined-doc-param"`` -* ``"undefined-global"`` +* ``"err-c-long-comment"`` +* ``"err-comment-prefix"`` +* ``"err-do-as-then"`` +* ``"err-eq-as-assign"`` +* ``"err-esc"`` +* ``"err-nonstandard-symbol"`` +* ``"err-then-as-do"`` +* ``"exp-in-action"`` * ``"global-in-nil-env"`` -* ``"redundant-return-value"`` -* ``"miss-sep-in-table"`` -* ``"unknown-cast-variable"`` -* ``"unknown-operator"`` +* ``"index-in-func-name"`` +* ``"jump-local-scope"`` +* ``"keyword"`` +* ``"local-limit"`` +* ``"lowercase-global"`` * ``"malformed-number"`` -* ``"err-do-as-then"`` -* ``"spell-check"`` -* ``"undefined-env-child"`` -* ``"missing-return-value"`` -* ``"discard-returns"`` -* ``"redundant-return"`` +* ``"miss-end"`` * ``"miss-esc-x"`` -* ``"redundant-value"`` -* ``"duplicate-doc-alias"`` -* ``"doc-field-no-class"`` -* ``"miss-loop-min"`` -* ``"no-visible-label"`` -* ``"miss-loop-max"`` * ``"miss-exp"`` -* ``"unicode-name"`` +* ``"miss-exponent"`` +* ``"miss-field"`` +* ``"miss-loop-max"`` +* ``"miss-loop-min"`` +* ``"miss-method"`` * ``"miss-name"`` -* ``"empty-block"`` -* ``"err-then-as-do"`` -* ``"redefined-label"`` -* ``"duplicate-doc-field"`` -* ``"exp-in-action"`` -* ``"set-const"`` -* ``"unexpect-lfunc-name"`` -* ``"circle-doc-class"`` -* ``"action-after-return"`` +* ``"miss-sep-in-table"`` * ``"miss-space-between"`` -* ``"unused-label"`` -* ``"unexpect-dots"`` -* ``"duplicate-index"`` -* ``"miss-field"`` -* ``"jump-local-scope"`` -* ``"close-non-object"`` -* ``"unexpect-symbol"`` -* ``"count-down-loop"`` -* ``"cast-type-mismatch"`` -* ``"newline-call"`` +* ``"miss-symbol"`` * ``"missing-parameter"`` -* ``"block-after-else"`` -* ``"miss-exponent"`` -* ``"err-esc"`` -* ``"local-limit"`` -* ``"unsupport-symbol"`` -* ``"trailing-space"`` -* ``"err-c-long-comment"`` -* ``"unbalanced-assignments"`` -* ``"duplicate-doc-param"`` -* ``"ambiguity-1"`` -* ``"deprecated"`` -* ``"codestyle-check"`` * ``"missing-return"`` -* ``"code-after-break"`` -* ``"unused-function"`` -* ``"cast-local-type"`` -* ``"assign-type-mismatch"`` -* ``"duplicate-set-field"`` -* ``"unused-vararg"`` +* ``"missing-return-value"`` * ``"need-check-nil"`` -* ``"keyword"`` -* ``"unused-local"`` -* ``"unknown-diag-code"`` -* ``"err-comment-prefix"`` -* ``"lowercase-global"`` -* ``"redefined-local"`` -* ``"undefined-doc-name"`` +* ``"newfield-call"`` +* ``"newline-call"`` * ``"no-unknown"`` -* ``"unreachable-code"`` +* ``"no-visible-label"`` +* ``"not-yieldable"`` * ``"param-type-mismatch"`` -* ``"index-in-func-name"`` -* ``"miss-symbol"`` -* ``"undefined-field"`` +* ``"redefined-label"`` +* ``"redefined-local"`` +* ``"redundant-parameter"`` +* ``"redundant-return"`` +* ``"redundant-return-value"`` +* ``"redundant-value"`` * ``"return-type-mismatch"`` +* ``"set-const"`` +* ``"spell-check"`` +* ``"trailing-space"`` +* ``"unbalanced-assignments"`` +* ``"undefined-doc-class"`` +* ``"undefined-doc-name"`` +* ``"undefined-doc-param"`` +* ``"undefined-env-child"`` +* ``"undefined-field"`` +* ``"undefined-global"`` +* ``"unexpect-dots"`` +* ``"unexpect-efunc-name"`` +* ``"unexpect-lfunc-name"`` +* ``"unexpect-symbol"`` +* ``"unicode-name"`` +* ``"unknown-attribute"`` +* ``"unknown-cast-variable"`` +* ``"unknown-diag-code"`` +* ``"unknown-operator"`` +* ``"unknown-symbol"`` +* ``"unreachable-code"`` +* ``"unsupport-symbol"`` +* ``"unused-function"`` +* ``"unused-label"`` +* ``"unused-local"`` +* ``"unused-vararg"`` ## default diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index 888cb25e..177096e5 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -188,101 +188,101 @@ Array<string> ## enum -* ``"not-yieldable"`` -* ``"redundant-parameter"`` +* ``"action-after-return"`` +* ``"ambiguity-1"`` +* ``"args-after-dots"`` +* ``"assign-type-mismatch"`` +* ``"await-in-sync"`` +* ``"block-after-else"`` * ``"break-outside"`` -* ``"undefined-doc-class"`` -* ``"unknown-symbol"`` -* ``"miss-method"`` -* ``"err-nonstandard-symbol"`` -* ``"unknown-attribute"`` -* ``"unexpect-efunc-name"`` +* ``"cast-local-type"`` +* ``"cast-type-mismatch"`` +* ``"circle-doc-class"`` +* ``"close-non-object"`` +* ``"code-after-break"`` +* ``"codestyle-check"`` +* ``"count-down-loop"`` +* ``"deprecated"`` * ``"different-requires"`` -* ``"miss-end"`` -* ``"await-in-sync"`` -* ``"args-after-dots"`` -* ``"err-eq-as-assign"`` -* ``"newfield-call"`` +* ``"discard-returns"`` +* ``"doc-field-no-class"`` +* ``"duplicate-doc-alias"`` +* ``"duplicate-doc-field"`` +* ``"duplicate-doc-param"`` +* ``"duplicate-index"`` +* ``"duplicate-set-field"`` +* ``"empty-block"`` * ``"err-assign-as-eq"`` -* ``"undefined-doc-param"`` -* ``"undefined-global"`` +* ``"err-c-long-comment"`` +* ``"err-comment-prefix"`` +* ``"err-do-as-then"`` +* ``"err-eq-as-assign"`` +* ``"err-esc"`` +* ``"err-nonstandard-symbol"`` +* ``"err-then-as-do"`` +* ``"exp-in-action"`` * ``"global-in-nil-env"`` -* ``"redundant-return-value"`` -* ``"miss-sep-in-table"`` -* ``"unknown-cast-variable"`` -* ``"unknown-operator"`` +* ``"index-in-func-name"`` +* ``"jump-local-scope"`` +* ``"keyword"`` +* ``"local-limit"`` +* ``"lowercase-global"`` * ``"malformed-number"`` -* ``"err-do-as-then"`` -* ``"spell-check"`` -* ``"undefined-env-child"`` -* ``"missing-return-value"`` -* ``"discard-returns"`` -* ``"redundant-return"`` +* ``"miss-end"`` * ``"miss-esc-x"`` -* ``"redundant-value"`` -* ``"duplicate-doc-alias"`` -* ``"doc-field-no-class"`` -* ``"miss-loop-min"`` -* ``"no-visible-label"`` -* ``"miss-loop-max"`` * ``"miss-exp"`` -* ``"unicode-name"`` +* ``"miss-exponent"`` +* ``"miss-field"`` +* ``"miss-loop-max"`` +* ``"miss-loop-min"`` +* ``"miss-method"`` * ``"miss-name"`` -* ``"empty-block"`` -* ``"err-then-as-do"`` -* ``"redefined-label"`` -* ``"duplicate-doc-field"`` -* ``"exp-in-action"`` -* ``"set-const"`` -* ``"unexpect-lfunc-name"`` -* ``"circle-doc-class"`` -* ``"action-after-return"`` +* ``"miss-sep-in-table"`` * ``"miss-space-between"`` -* ``"unused-label"`` -* ``"unexpect-dots"`` -* ``"duplicate-index"`` -* ``"miss-field"`` -* ``"jump-local-scope"`` -* ``"close-non-object"`` -* ``"unexpect-symbol"`` -* ``"count-down-loop"`` -* ``"cast-type-mismatch"`` -* ``"newline-call"`` +* ``"miss-symbol"`` * ``"missing-parameter"`` -* ``"block-after-else"`` -* ``"miss-exponent"`` -* ``"err-esc"`` -* ``"local-limit"`` -* ``"unsupport-symbol"`` -* ``"trailing-space"`` -* ``"err-c-long-comment"`` -* ``"unbalanced-assignments"`` -* ``"duplicate-doc-param"`` -* ``"ambiguity-1"`` -* ``"deprecated"`` -* ``"codestyle-check"`` * ``"missing-return"`` -* ``"code-after-break"`` -* ``"unused-function"`` -* ``"cast-local-type"`` -* ``"assign-type-mismatch"`` -* ``"duplicate-set-field"`` -* ``"unused-vararg"`` +* ``"missing-return-value"`` * ``"need-check-nil"`` -* ``"keyword"`` -* ``"unused-local"`` -* ``"unknown-diag-code"`` -* ``"err-comment-prefix"`` -* ``"lowercase-global"`` -* ``"redefined-local"`` -* ``"undefined-doc-name"`` +* ``"newfield-call"`` +* ``"newline-call"`` * ``"no-unknown"`` -* ``"unreachable-code"`` +* ``"no-visible-label"`` +* ``"not-yieldable"`` * ``"param-type-mismatch"`` -* ``"index-in-func-name"`` -* ``"miss-symbol"`` -* ``"undefined-field"`` +* ``"redefined-label"`` +* ``"redefined-local"`` +* ``"redundant-parameter"`` +* ``"redundant-return"`` +* ``"redundant-return-value"`` +* ``"redundant-value"`` * ``"return-type-mismatch"`` +* ``"set-const"`` +* ``"spell-check"`` +* ``"trailing-space"`` +* ``"unbalanced-assignments"`` +* ``"undefined-doc-class"`` +* ``"undefined-doc-name"`` +* ``"undefined-doc-param"`` +* ``"undefined-env-child"`` +* ``"undefined-field"`` +* ``"undefined-global"`` +* ``"unexpect-dots"`` +* ``"unexpect-efunc-name"`` +* ``"unexpect-lfunc-name"`` +* ``"unexpect-symbol"`` +* ``"unicode-name"`` +* ``"unknown-attribute"`` +* ``"unknown-cast-variable"`` +* ``"unknown-diag-code"`` +* ``"unknown-operator"`` +* ``"unknown-symbol"`` +* ``"unreachable-code"`` +* ``"unsupport-symbol"`` +* ``"unused-function"`` +* ``"unused-label"`` +* ``"unused-local"`` +* ``"unused-vararg"`` ## default diff --git a/doc/zh-tw/config.md b/doc/zh-tw/config.md index adf09ae6..acfc9d99 100644 --- a/doc/zh-tw/config.md +++ b/doc/zh-tw/config.md @@ -188,101 +188,101 @@ Array<string> ## enum -* ``"not-yieldable"`` -* ``"redundant-parameter"`` +* ``"action-after-return"`` +* ``"ambiguity-1"`` +* ``"args-after-dots"`` +* ``"assign-type-mismatch"`` +* ``"await-in-sync"`` +* ``"block-after-else"`` * ``"break-outside"`` -* ``"undefined-doc-class"`` -* ``"unknown-symbol"`` -* ``"miss-method"`` -* ``"err-nonstandard-symbol"`` -* ``"unknown-attribute"`` -* ``"unexpect-efunc-name"`` +* ``"cast-local-type"`` +* ``"cast-type-mismatch"`` +* ``"circle-doc-class"`` +* ``"close-non-object"`` +* ``"code-after-break"`` +* ``"codestyle-check"`` +* ``"count-down-loop"`` +* ``"deprecated"`` * ``"different-requires"`` -* ``"miss-end"`` -* ``"await-in-sync"`` -* ``"args-after-dots"`` -* ``"err-eq-as-assign"`` -* ``"newfield-call"`` +* ``"discard-returns"`` +* ``"doc-field-no-class"`` +* ``"duplicate-doc-alias"`` +* ``"duplicate-doc-field"`` +* ``"duplicate-doc-param"`` +* ``"duplicate-index"`` +* ``"duplicate-set-field"`` +* ``"empty-block"`` * ``"err-assign-as-eq"`` -* ``"undefined-doc-param"`` -* ``"undefined-global"`` +* ``"err-c-long-comment"`` +* ``"err-comment-prefix"`` +* ``"err-do-as-then"`` +* ``"err-eq-as-assign"`` +* ``"err-esc"`` +* ``"err-nonstandard-symbol"`` +* ``"err-then-as-do"`` +* ``"exp-in-action"`` * ``"global-in-nil-env"`` -* ``"redundant-return-value"`` -* ``"miss-sep-in-table"`` -* ``"unknown-cast-variable"`` -* ``"unknown-operator"`` +* ``"index-in-func-name"`` +* ``"jump-local-scope"`` +* ``"keyword"`` +* ``"local-limit"`` +* ``"lowercase-global"`` * ``"malformed-number"`` -* ``"err-do-as-then"`` -* ``"spell-check"`` -* ``"undefined-env-child"`` -* ``"missing-return-value"`` -* ``"discard-returns"`` -* ``"redundant-return"`` +* ``"miss-end"`` * ``"miss-esc-x"`` -* ``"redundant-value"`` -* ``"duplicate-doc-alias"`` -* ``"doc-field-no-class"`` -* ``"miss-loop-min"`` -* ``"no-visible-label"`` -* ``"miss-loop-max"`` * ``"miss-exp"`` -* ``"unicode-name"`` +* ``"miss-exponent"`` +* ``"miss-field"`` +* ``"miss-loop-max"`` +* ``"miss-loop-min"`` +* ``"miss-method"`` * ``"miss-name"`` -* ``"empty-block"`` -* ``"err-then-as-do"`` -* ``"redefined-label"`` -* ``"duplicate-doc-field"`` -* ``"exp-in-action"`` -* ``"set-const"`` -* ``"unexpect-lfunc-name"`` -* ``"circle-doc-class"`` -* ``"action-after-return"`` +* ``"miss-sep-in-table"`` * ``"miss-space-between"`` -* ``"unused-label"`` -* ``"unexpect-dots"`` -* ``"duplicate-index"`` -* ``"miss-field"`` -* ``"jump-local-scope"`` -* ``"close-non-object"`` -* ``"unexpect-symbol"`` -* ``"count-down-loop"`` -* ``"cast-type-mismatch"`` -* ``"newline-call"`` +* ``"miss-symbol"`` * ``"missing-parameter"`` -* ``"block-after-else"`` -* ``"miss-exponent"`` -* ``"err-esc"`` -* ``"local-limit"`` -* ``"unsupport-symbol"`` -* ``"trailing-space"`` -* ``"err-c-long-comment"`` -* ``"unbalanced-assignments"`` -* ``"duplicate-doc-param"`` -* ``"ambiguity-1"`` -* ``"deprecated"`` -* ``"codestyle-check"`` * ``"missing-return"`` -* ``"code-after-break"`` -* ``"unused-function"`` -* ``"cast-local-type"`` -* ``"assign-type-mismatch"`` -* ``"duplicate-set-field"`` -* ``"unused-vararg"`` +* ``"missing-return-value"`` * ``"need-check-nil"`` -* ``"keyword"`` -* ``"unused-local"`` -* ``"unknown-diag-code"`` -* ``"err-comment-prefix"`` -* ``"lowercase-global"`` -* ``"redefined-local"`` -* ``"undefined-doc-name"`` +* ``"newfield-call"`` +* ``"newline-call"`` * ``"no-unknown"`` -* ``"unreachable-code"`` +* ``"no-visible-label"`` +* ``"not-yieldable"`` * ``"param-type-mismatch"`` -* ``"index-in-func-name"`` -* ``"miss-symbol"`` -* ``"undefined-field"`` +* ``"redefined-label"`` +* ``"redefined-local"`` +* ``"redundant-parameter"`` +* ``"redundant-return"`` +* ``"redundant-return-value"`` +* ``"redundant-value"`` * ``"return-type-mismatch"`` +* ``"set-const"`` +* ``"spell-check"`` +* ``"trailing-space"`` +* ``"unbalanced-assignments"`` +* ``"undefined-doc-class"`` +* ``"undefined-doc-name"`` +* ``"undefined-doc-param"`` +* ``"undefined-env-child"`` +* ``"undefined-field"`` +* ``"undefined-global"`` +* ``"unexpect-dots"`` +* ``"unexpect-efunc-name"`` +* ``"unexpect-lfunc-name"`` +* ``"unexpect-symbol"`` +* ``"unicode-name"`` +* ``"unknown-attribute"`` +* ``"unknown-cast-variable"`` +* ``"unknown-diag-code"`` +* ``"unknown-operator"`` +* ``"unknown-symbol"`` +* ``"unreachable-code"`` +* ``"unsupport-symbol"`` +* ``"unused-function"`` +* ``"unused-label"`` +* ``"unused-local"`` +* ``"unused-vararg"`` ## default diff --git a/script/config/template.lua b/script/config/template.lua index fa0c2772..850f2b4e 100644 --- a/script/config/template.lua +++ b/script/config/template.lua @@ -239,7 +239,7 @@ local template = { >> util.deepCopy(define.BuiltIn), ['Lua.diagnostics.enable'] = Type.Boolean >> true, ['Lua.diagnostics.globals'] = Type.Array(Type.String), - ['Lua.diagnostics.disable'] = Type.Array(Type.String << util.getTableKeys(diag.getDiagAndErrNameMap())), + ['Lua.diagnostics.disable'] = Type.Array(Type.String << util.getTableKeys(diag.getDiagAndErrNameMap(), true)), ['Lua.diagnostics.severity'] = Type.Hash( Type.String << util.getTableKeys(define.DiagnosticDefaultNeededFileStatus, true), Type.String << { diff --git a/script/utility.lua b/script/utility.lua index 8e6c6a88..66beaf07 100644 --- a/script/utility.lua +++ b/script/utility.lua @@ -799,6 +799,8 @@ function m.multiTable(count, default) return current end +---@param t table +---@param sorter boolean|function function m.getTableKeys(t, sorter) local keys = {} for k in pairs(t) do @@ -806,7 +808,7 @@ function m.getTableKeys(t, sorter) end if sorter == true then tableSort(keys) - elseif sorter then + elseif type(sorter) == 'function' then tableSort(keys, sorter) end return keys |