Skip to content

Commit

Permalink
update(falco): add deprecation warning messages
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Guerra <[email protected]>
Co-authored-by: Federico Di Pierro <[email protected]>
Co-authored-by: Melissa Kilby <[email protected]>
  • Loading branch information
3 people authored and poiana committed May 15, 2024
1 parent f9a56d9 commit eb3ee5d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions userspace/falco/app/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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=<tag> instead.");
for(auto &tag : m_cmdline_parsed["T"].as<std::vector<std::string>>())
{
disabled_rule_tags.insert(tag);
Expand All @@ -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=<tag> instead.");
for(auto &tag : m_cmdline_parsed["t"].as<std::vector<std::string>>())
{
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=<wildcard-pattern> instead.");
}

// Some combinations of arguments are not allowed.

// You can't both disable and enable rules
Expand Down

0 comments on commit eb3ee5d

Please sign in to comment.