From 4fbcb7b75aa0ea18fac6c4b77fcdee97921f36bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 23 Feb 2021 19:41:24 +0800 Subject: `duplicate-set-field` add excludes --- script/core/diagnostics/duplicate-set-field.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'script/core/diagnostics/duplicate-set-field.lua') diff --git a/script/core/diagnostics/duplicate-set-field.lua b/script/core/diagnostics/duplicate-set-field.lua index bf7fd069..7c857a51 100644 --- a/script/core/diagnostics/duplicate-set-field.lua +++ b/script/core/diagnostics/duplicate-set-field.lua @@ -30,6 +30,13 @@ return function (uri, callback) if not name then goto CONTINUE end + local value = guide.getObjectValue(nxt) + if value then + if value.type == 'boolean' + or value.type == 'nil' then + goto CONTINUE + end + end if not sets[name] then sets[name] = {} end -- cgit v1.2.3