fix: suppress false SCL003 warning for ARRAY[...] type constructor
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user