File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,6 +327,22 @@ the rest of rules that don't rely on that module will be correctly compiled.
327327
328328------
329329
330+ #### yrx_compiler_max_warnings
331+
332+ {{< callout >}}
333+ New in version 1.16.0
334+ {{< /callout >}}
335+
336+ ``` c
337+ enum YRX_RESULT yrx_compiler_max_warnings (
338+ struct YRX_COMPILER *compiler,
339+ size_t n);
340+ ```
341+
342+ Sets the maximum number of warnings. The compiler will report only the first `n` warnings.
343+
344+ ------
345+
330346#### yrx_compiler_ban_module
331347
332348```c
Original file line number Diff line number Diff line change @@ -211,6 +211,21 @@ compiler.define_global("my_int_var", 1)
211211compiler.add_source(" rule test { condition: my_int_var == 1 }" )
212212```
213213
214+ #### .max_warnings(n)
215+
216+ {{< callout >}}
217+ New in version 1.16.0
218+ {{< /callout >}}
219+
220+ Sets the maximum number of warnings. The compiler will report only the first ` n ` warnings.
221+
222+ ##### Example
223+
224+ ``` python
225+ compiler = yara_x.Compiler()
226+ compiler.max_warnings(1 )
227+ ```
228+
214229#### .enable_includes(bool)
215230
216231Enables or disables the inclusion of files with the ` include ` directive. When includes
Original file line number Diff line number Diff line change 456456 " example-2" ,
457457 " example-20" ,
458458 " example-21" ,
459+ " example-22" ,
459460 " example-3" ,
460461 " example-4" ,
461462 " example-5" ,
557558 " logmessage-boolean" ,
558559 " logmessage-float" ,
559560 " logmessage-integer" ,
560- " logmessage-offset-length-new-in-version-v1150 " ,
561+ " logmessage-offset-length" ,
561562 " logmessage-string" ,
562- " logoffset-length-new-in-version-v1150 " ,
563+ " logoffset-length" ,
563564 " logstring" ,
564565 " machine" ,
565566 " mapitem" ,
569570 " match-lengths" ,
570571 " matches" ,
571572 " matching_rules" ,
573+ " max_warningsn" ,
572574 " maxint-int" ,
573575 " md5offset-size" ,
574576 " md5string" ,
736738 " yrx_compiler_destroy" ,
737739 " yrx_compiler_errors_json" ,
738740 " yrx_compiler_ignore_module" ,
741+ " yrx_compiler_max_warnings" ,
739742 " yrx_compiler_new_namespace" ,
740743 " yrx_compiler_warnings_json" ,
741744 " yrx_console_callback" ,
You can’t perform that action at this time.
0 commit comments