diff --git a/userspace/engine/falco_engine.cpp b/userspace/engine/falco_engine.cpp index df74e1a0..952c8a37 100644 --- a/userspace/engine/falco_engine.cpp +++ b/userspace/engine/falco_engine.cpp @@ -171,9 +171,8 @@ void falco_engine::load_rules(const string &rules_content, bool verbose, bool al m_ls); } - // Note that falco_formats is added to both the lua state used - // by the falco engine as well as the separate lua state used - // by falco outputs. Within the engine, only + // Note that falco_formats is added to the lua state used + // by the falco engine only. Within the engine, only // formats.formatter is used, so we can unconditionally set // json_output to false. bool json_output = false; diff --git a/userspace/falco/falco_outputs.cpp b/userspace/falco/falco_outputs.cpp index eec51df9..8274c651 100644 --- a/userspace/falco/falco_outputs.cpp +++ b/userspace/falco/falco_outputs.cpp @@ -72,7 +72,9 @@ void falco_outputs::init(bool 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_include_output_property = json_include_output_property;