mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-16 23:08:16 +00:00
Add addl support for rules reader/compiler subclasses
To support subclasses that may extend the falco rules format, add additional error/warning/item types for an extension item. When subclasses report errors and warnings, they can use these codes/item types in context objects and still provide an exact line/column context. Also make some previously static functions in rules reader protected methods so they can be used in sub-classes. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
@@ -34,7 +34,8 @@ public:
|
||||
LOAD_ERR_YAML_VALIDATE,
|
||||
LOAD_ERR_COMPILE_CONDITION,
|
||||
LOAD_ERR_COMPILE_OUTPUT,
|
||||
LOAD_ERR_VALIDATE
|
||||
LOAD_ERR_VALIDATE,
|
||||
LOAD_ERR_EXTENSION
|
||||
};
|
||||
|
||||
// The error code as a string
|
||||
@@ -55,7 +56,8 @@ public:
|
||||
LOAD_UNUSED_MACRO,
|
||||
LOAD_UNUSED_LIST,
|
||||
LOAD_UNKNOWN_ITEM,
|
||||
LOAD_DEPRECATED_ITEM
|
||||
LOAD_DEPRECATED_ITEM,
|
||||
LOAD_WARNING_EXTENSION
|
||||
};
|
||||
|
||||
virtual ~load_result() = default;
|
||||
|
Reference in New Issue
Block a user