From 3ba1ccbb1bd2786b0531e06d3738bc282237d1a5 Mon Sep 17 00:00:00 2001 From: Lazar Bulovan Date: Mon, 20 Jul 2026 14:52:21 +0200 Subject: [PATCH] fix: suppress false SCL003 warning for ARRAY[...] type constructor --- src/diagnostics.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/diagnostics.lua b/src/diagnostics.lua index 5d0c466..87dbc65 100644 --- a/src/diagnostics.lua +++ b/src/diagnostics.lua @@ -218,8 +218,13 @@ function M.validate_diagnostics(content, workspace_types, root_dir) if type_part:match("%s+OF%s+") then base_type = type_part:match('.*%s+OF%s+"([^"]+)"') or type_part:match(".*%s+OF%s+([%w_]+)") end + + local is_array_keyword = base_type and base_type:upper() == "ARRAY" + and type_part:match("^[Aa][Rr][Rr][Aa][Yy]%[") + local upper_type = base_type and base_type:upper() or nil if base_type and base_type ~= "" and + not is_array_keyword and not all_types[base_type] and not builtin.is_known_data_type(upper_type) and not builtin.is_known_type_or_instruction(upper_type) then