Closed
Description
Due to the way we pass a file to every single plugin, rather than a line, we end up regex.search
ing the same line P times, where P is the number of plugins. This holds true for both ALLOWLIST_REGEXES
and --exclude-lines
. For large diffs on a tightly provisioned box this can be quite inefficient.
The relevant control flow is as follows
detect-secrets/detect_secrets/core/secrets_collection.py
Lines 336 to 341 in 5d3e065
detect-secrets/detect_secrets/plugins/base.py
Lines 45 to 57 in 5d3e065
detect-secrets/detect_secrets/plugins/base.py
Lines 81 to 97 in 5d3e065
Metadata
Assignees
Labels
No labels