Skip to content

Default regex for dynamic PEPs and rules does not cover except/finally PEPs #263

Description

@korydraughn

The regex string that follows needs to be changed to "[^ ]*pep_[^ ]*_(pre|post|except|finally)".

const std::string DYNAMIC_PEP_RULE_REGEX = "[^ ]*pep_[^ ]*_(pre|post)";

DYNAMIC_PEP_RULE_REGEX is used when the plugin_specific_configuration stanza in server_config.json does not explicitly define regexes_for_supported_peps. The code block below highlights where this occurs.

RuleExistsHelper::Instance()->registerRuleRegex(DYNAMIC_PEP_RULE_REGEX);
// clang-format off
log_re::debug({
{"rule_engine_plugin", rule_engine_name},
{"instance_name", _instance_name},
{"log_message", "No regexes found in server_config for Python RE - using default regexes"},
{"static_pep_rule_regex", STATIC_PEP_RULE_REGEX},
{"dynamic_pep_rule_regex", DYNAMIC_PEP_RULE_REGEX},
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions