You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ls/editors/code/README.md
+43-10Lines changed: 43 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,17 +45,50 @@ An image is worth a thousand words...
45
45
46
46
## Configuration
47
47
48
-
This extension respects the standard Visual Studio Code settings for formatting and other editor features. There are no YARA-X specific settings at this time.
49
-
50
-
The extension contributes the following default settings for the `[yara]` language:
48
+
This extension provides configurations through VSCode's configuration settings. All configurations are under `YARA.*`.
51
49
52
50
```json
53
-
"[yara]": {
54
-
"editor.tabSize": 4,
55
-
"editor.insertSpaces": false,
56
-
"editor.detectIndentation": false,
57
-
"editor.formatOnSave": true
58
-
}
51
+
"YARA.ruleNameValidation": "^APT_.+$",
52
+
"YARA.metadataValidation": [
53
+
{
54
+
"identifier": "author",
55
+
"required": true,
56
+
"type": "string"
57
+
},
58
+
{
59
+
"identifier": "version",
60
+
"required": true,
61
+
"type": "integer"
62
+
}
63
+
]
59
64
```
60
65
61
-
You can override these in your user or workspace settings.
66
+
### `YARA.ruleNameValidation`
67
+
68
+
Type: `string`
69
+
Default: `""` (no validation)
70
+
71
+
A regular expression that rule names must conform to. If a rule name does not match this pattern, a warning will be
72
+
generated.
73
+
74
+
### `YARA.metadataValidation`
75
+
76
+
Type: `array` of objects
77
+
Default: `[]` (no validation)
78
+
79
+
An array of objects, where each object defines validation rules for a specific metadata field. Each object can have
80
+
the following properties:
81
+
82
+
*`identifier` (string, required): The name of the metadata field to validate (e.g., `author`, `version`).
83
+
*`required` (boolean, optional): If `true`, the metadata field must be present in the rule. Defaults to `false`.
84
+
*`type` (string, optional): Specifies the expected type of the metadata value. Valid values are
85
+
`"string"`, `"integer"`, `"float"`, and `"bool"`. If the value does not match the specified type, a warning will
0 commit comments