Skip to content

Commit

Permalink
fix: default severity in CLI with partial 'diagnostics.severity' config
Browse files Browse the repository at this point in the history
  • Loading branch information
tomlau10 committed Jun 26, 2024
1 parent ffee37b commit 0f64ab1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
## Unreleased
<!-- Add all new changes here. They will be moved under a version at release -->
* `NEW` Add postfix snippet for `unpack`
* `FIX` [#2730]

[#2730]: https://github.com/LuaLS/lua-language-server/issues/2730

## 3.9.3
`2024-6-11`
Expand Down
2 changes: 1 addition & 1 deletion script/cli/check_worker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ xpcall(lclient.start, errorhandler, lclient, function (client)

local disables = util.arrayToHash(config.get(rootUri, 'Lua.diagnostics.disable'))
for name, serverity in pairs(define.DiagnosticDefaultSeverity) do
serverity = config.get(rootUri, 'Lua.diagnostics.severity')[name] or 'Warning'
serverity = config.get(rootUri, 'Lua.diagnostics.severity')[name] or serverity
if serverity:sub(-1) == '!' then
serverity = serverity:sub(1, -2)
end
Expand Down

0 comments on commit 0f64ab1

Please sign in to comment.