diff --git a/capi/include/yara_x.h b/capi/include/yara_x.h index a44fcb56b..1dbe05b37 100644 --- a/capi/include/yara_x.h +++ b/capi/include/yara_x.h @@ -452,9 +452,9 @@ enum YRX_RESULT yrx_compiler_define_global_float(struct YRX_COMPILER *compiler, // (e.g., booleans, integers, strings), prefer dedicated functions to avoid // the overhead of JSON deserialization. // -// When defining a map, keys must be of string type and valid YARA identifiers, -// and values can be any of the types supported by YARA, including other maps. -// Arrays must be homogeneous (all elements must be the same type). +// When defining a map, keys must be of string type, and values can be +// any of the types supported by YARA, including other maps. Arrays must be +// homogeneous (all elements must be the same type). enum YRX_RESULT yrx_compiler_define_global_json(struct YRX_COMPILER *compiler, const char *ident, const char *value); diff --git a/ls/src/features/diagnostics.rs b/ls/src/features/diagnostics.rs index f3214c7e8..a1ef59858 100644 --- a/ls/src/features/diagnostics.rs +++ b/ls/src/features/diagnostics.rs @@ -69,6 +69,14 @@ pub fn compiler_diagnostics( let mut compiler = Compiler::new(); + // These features are required by the "vt" module. Some field will be + // recognized only if these features are enabled. + compiler + .enable_feature("file") + .enable_feature("url") + .enable_feature("ip_address") + .enable_feature("domain"); + if let Some(regex) = rule_name_validation { if let Ok(linter) = linters::rule_name(regex) { compiler.add_linter(linter);