mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-07-27 07:01:02 +03:00
fix(cfe-validate): remove false DataPath/TitleDataPath check from Check 11
Configurator stores DataPath inside <BaseForm> as original form snapshot — this is normal behavior, not an error. Removes false WARN on Configurator-exported extensions like JR2433. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
e7e6c885c7
commit
8584021446
@@ -764,14 +764,6 @@ def main():
|
||||
if '<BaseForm' in form_raw_text:
|
||||
if not re.search(r'<BaseForm[^>]+version=', form_raw_text):
|
||||
r.warn(f'11. {ctx}: <BaseForm> missing version attribute')
|
||||
# Check DataPath/TitleDataPath only inside BaseForm (not in extension-added elements)
|
||||
bf_match = re.search(r'(?s)<BaseForm[^>]*>(.+)</BaseForm>', form_raw_text)
|
||||
if bf_match:
|
||||
bf_content = bf_match.group(1)
|
||||
if re.search(r'<DataPath>[^<]+</DataPath>', bf_content):
|
||||
r.warn(f'11. {ctx}: <DataPath> found in BaseForm (should be stripped for borrowed forms)')
|
||||
if re.search(r'<TitleDataPath>[^<]+</TitleDataPath>', bf_content):
|
||||
r.warn(f'11. {ctx}: <TitleDataPath> found in BaseForm (should be stripped)')
|
||||
borrowed_forms_with_tree.append({
|
||||
'Path': form_xml_file, 'RawText': form_raw_text, 'Context': ctx,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user