Comments (1)
I think I've found the root cause of this 🐛 🎉
The default severity value set by script/cli/check_worker#L86 seems incorrect when the Lua.diagnostics.severity
config setting is incomplete.
It should be or serverity
instead of or 'Warning'
, as otherwise any unset diagnostics.severity
in the config table will be incorrectly treated as Warning
, and thus not added to the disables[]
.
for name, serverity in pairs(define.DiagnosticDefaultSeverity) do
serverity = config.get(rootUri, 'Lua.diagnostics.severity')[name] or 'Warning' --<<< this should be `or serverity`
if serverity:sub(-1) == '!' then
serverity = serverity:sub(1, -2)
end
if define.DiagnosticSeverity[serverity] > checkLevel then -- the above logic error causing incorrect behavior of this level check
disables[name] = true
end
I've tested the change locally and it's working as expected now 🎉
I may soon open a pr for it 😄
ps:
btw the variable name serverity
contains a typo, it should be severity
🙂
from lua-language-server.
Related Issues (20)
- Using 'then' or 'do' in string literals incorrectly causes indentation HOT 4
- More Unreachable Code Undetected HOT 1
- inconsistent behavior for `diagnosis (missing-fields)`.
- 按ctrl+鼠标左键跳转时,我想吧build目录去掉 HOT 3
- script\vm\compiler.lua:2023: attempt to index a nil value HOT 3
- @operator add customization for first operand? HOT 5
- Incorrect automatic indenting HOT 5
- Unexpected repeated alias expanding 类型别名错误地重复展开 HOT 3
- Disappointing speed 😭 HOT 9
- discrepancy between the completion elements provided by the server and those displayed by vscode HOT 1
- vscode does not list server-provided completion items. HOT 1
- How to make a third-party member function as deprecated HOT 7
- Please add an option under the 'hint' category to specify a max length for hints HOT 3
- [Annotations] false positive param-type-mismatch on a class member function HOT 5
- ERROR: script/core/hint.lua:320: attempt to index a nil value (local 'last') HOT 3
- [FEATURE-REQUEST] Configuration option to disable didRenameFiles prompt HOT 1
- Unable to use `@enum` or `@alias` type in table index (index signature) HOT 2
- Hint display is incorrect when using plugin
- Modifying `.luarc.json` instead of `settings.json` with the Extension API HOT 4
- Unexpected behavior of terminal pop-up
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lua-language-server.