STRA-338: architecture gate forbids new mechanical file names (impl_*, *_fn, numbered), baseline lists the 964 existing; rustsplit names modules after what they hold
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
4b04c24981
commit
ac60df040f
@@ -2,6 +2,7 @@
|
||||
import re
|
||||
|
||||
from .items import parse_items, significant
|
||||
from .names import distinct
|
||||
from .lexer import tokenize
|
||||
from .retarget import INCLUDE, _path_edits, _restricted_visibility_edits
|
||||
|
||||
@@ -64,11 +65,8 @@ def topic(items):
|
||||
|
||||
|
||||
def unique(name, used):
|
||||
candidate, n = name, 2
|
||||
while candidate in used:
|
||||
candidate, n = f"{name}_{n}", n + 1
|
||||
used.add(candidate)
|
||||
return candidate
|
||||
"""`name`, or `name` plus a word when it is taken (see `names.distinct`)."""
|
||||
return distinct(name, used, MAX_NAME)
|
||||
|
||||
|
||||
def remove_ranges(text, ranges):
|
||||
|
||||
Reference in New Issue
Block a user