From 74f38705f264c1ac268e592f17442dbb473acbf9 Mon Sep 17 00:00:00 2001 From: Luca Guerra Date: Tue, 14 May 2024 16:30:42 +0000 Subject: [PATCH] update(falco): add deprecation warning messages Signed-off-by: Luca Guerra --- userspace/falco/app/options.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/userspace/falco/app/options.cpp b/userspace/falco/app/options.cpp index ff682ff3001..cc771ffe451 100644 --- a/userspace/falco/app/options.cpp +++ b/userspace/falco/app/options.cpp @@ -98,6 +98,7 @@ bool options::parse(int argc, char **argv, std::string &errstr) // Convert the vectors of enabled/disabled tags into sets to match falco engine API if(m_cmdline_parsed.count("T") > 0) { + falco_logger::log(falco_logger::level::WARNING, "The -T option is deprecated and will be removed in Falco 0.39.0. Use -o rules[].disable.tag= instead."); for(auto &tag : m_cmdline_parsed["T"].as>()) { disabled_rule_tags.insert(tag); @@ -106,12 +107,18 @@ bool options::parse(int argc, char **argv, std::string &errstr) if(m_cmdline_parsed.count("t") > 0) { + falco_logger::log(falco_logger::level::WARNING, "The -t option is deprecated and will be removed in Falco 0.39.0. Use -o rules[].disable.rule=* -o rules[].enable.tag= instead."); for(auto &tag : m_cmdline_parsed["t"].as>()) { enabled_rule_tags.insert(tag); } } + if(disabled_rule_substrings.size() > 0) + { + falco_logger::log(falco_logger::level::WARNING, "The -d option is deprecated and will be removed in Falco 0.39.0. Use -o rules[].disable.rule= instead."); + } + // Some combinations of arguments are not allowed. // You can't both disable and enable rules