fix(tooling): audit_metrics counts the demo footprint by the banned word
Its pattern also matched "demote" and the Hungarian "Demokratikus", so the footprint read 5 after the demo was gone (and 56, not 53, in the S1 baseline). It now uses the removedFeatures contract test's pattern.
This commit is contained in:
@@ -144,7 +144,8 @@ def _footprint(
|
|||||||
) -> dict[str, int]:
|
) -> dict[str, int]:
|
||||||
"""Files that still mention a feature marked for removal: 0 once it is gone."""
|
"""Files that still mention a feature marked for removal: 0 once it is gone."""
|
||||||
patterns = {
|
patterns = {
|
||||||
"demo_files": re.compile(r"\bdemo|isDemo|is_demo", re.IGNORECASE),
|
# the word removedFeatures.contract.test.ts bans: not "demote", not "Demokratikus"
|
||||||
|
"demo_files": re.compile(r"demo(?!t(e|ion)|kr)", re.IGNORECASE),
|
||||||
"chat_files": re.compile(r"\bchat\b|\bmessages?\.py|\bChat[A-Z]|message_keys"),
|
"chat_files": re.compile(r"\bchat\b|\bmessages?\.py|\bChat[A-Z]|message_keys"),
|
||||||
# the public form, not the admin's access-request queue (that stays)
|
# the public form, not the admin's access-request queue (that stays)
|
||||||
"access_request_form_files": re.compile(r"request[-_]access|requestAccess|AccessRequestIn"),
|
"access_request_form_files": re.compile(r"request[-_]access|requestAccess|AccessRequestIn"),
|
||||||
|
|||||||
Reference in New Issue
Block a user