fix(modules): case-insensitive module ref lookup
All checks were successful
Build and Deploy iLSP / test (push) Successful in 22s
Build and Deploy iLSP / build-and-deploy (push) Successful in 1m20s

Catalog stores lowercase paths (e.g. modules/keyvault) but .bicep files
may use camelCase (e.g. modules/keyVault). Make get_module_by_ref
case-insensitive so completions work regardless of casing.
This commit is contained in:
Henrik Jess Nielsen
2026-05-11 11:41:35 +02:00
parent 02c09f1d18
commit 5cb3e04b6e

View File

@@ -129,9 +129,11 @@ class BicepModuleCatalog:
Matches both new-style ('modules/appservice', 'util/types') and old-style
bare names ('appservice') so completions work regardless of module version.
Case-insensitive to handle catalog lowercase vs. camelCase in .bicep files.
"""
ref_lower = ref_path.lower()
for mod in cls._modules:
if mod["ref_path"] == ref_path or mod["name"] == ref_path:
if mod["ref_path"].lower() == ref_lower or mod["name"].lower() == ref_lower:
return mod
return None