mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-08 18:19:30 +00:00
chore: update comments to reflect the impl
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
This commit is contained in:
@@ -171,9 +171,8 @@ void falco_engine::load_rules(const string &rules_content, bool verbose, bool al
|
|||||||
m_ls);
|
m_ls);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that falco_formats is added to both the lua state used
|
// Note that falco_formats is added to the lua state used
|
||||||
// by the falco engine as well as the separate lua state used
|
// by the falco engine only. Within the engine, only
|
||||||
// by falco outputs. Within the engine, only
|
|
||||||
// formats.formatter is used, so we can unconditionally set
|
// formats.formatter is used, so we can unconditionally set
|
||||||
// json_output to false.
|
// json_output to false.
|
||||||
bool json_output = false;
|
bool json_output = false;
|
||||||
|
@@ -72,7 +72,9 @@ void falco_outputs::init(bool json_output,
|
|||||||
|
|
||||||
m_json_output = json_output;
|
m_json_output = json_output;
|
||||||
|
|
||||||
// todo(leogr): explain why falco_formats does not need to be initialized here
|
// Note that falco_formats is already initialized by the engine,
|
||||||
|
// and the following json options are not used within the engine.
|
||||||
|
// So we can safely update them.
|
||||||
falco_formats::s_json_output = json_output;
|
falco_formats::s_json_output = json_output;
|
||||||
falco_formats::s_json_include_output_property = json_include_output_property;
|
falco_formats::s_json_include_output_property = json_include_output_property;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user