mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-07 20:20:20 +03:00
fix(form-validate): context-aware Check 12 — ExternalDataProcessorObject is error in config
Detect config vs EPF context by walking up from FormPath looking for Configuration.xml. ExternalDataProcessorObject/ExternalReportObject are valid in EPF/ERF but cause XDTO exception in configuration context. - EPF forms: no warning (ExternalDataProcessorObject is correct) - Config forms: ERROR with hint to use DataProcessorObject/ReportObject - Fix test DSLs: compiled-form, table-form used wrong External* type Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
3bd69baae6
commit
d5aacc9e60
@@ -738,8 +738,8 @@ if (-not $stopped) {
|
|||||||
if ($pfx -in $validCfgPrefixes) {
|
if ($pfx -in $validCfgPrefixes) {
|
||||||
# ExternalDataProcessorObject/ExternalReportObject valid only for EPF/ERF, not config
|
# ExternalDataProcessorObject/ExternalReportObject valid only for EPF/ERF, not config
|
||||||
if ($script:isConfigContext -and ($pfx -eq "ExternalDataProcessorObject" -or $pfx -eq "ExternalReportObject")) {
|
if ($script:isConfigContext -and ($pfx -eq "ExternalDataProcessorObject" -or $pfx -eq "ExternalReportObject")) {
|
||||||
Report-Warn "12. Type '$tv': External* type in configuration context (use DataProcessorObject/ReportObject instead)"
|
Report-Error "12. Type '$tv': External* type in configuration context (use DataProcessorObject/ReportObject instead)"
|
||||||
$typeOk = $false
|
$typeOk = $false; $typeInvalid++
|
||||||
}
|
}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -660,8 +660,8 @@ def main():
|
|||||||
if prefix in VALID_CFG_PREFIXES or suffix == "DynamicList":
|
if prefix in VALID_CFG_PREFIXES or suffix == "DynamicList":
|
||||||
# ExternalDataProcessorObject/ExternalReportObject valid only in EPF/ERF context
|
# ExternalDataProcessorObject/ExternalReportObject valid only in EPF/ERF context
|
||||||
if is_config_context and prefix in ('ExternalDataProcessorObject', 'ExternalReportObject'):
|
if is_config_context and prefix in ('ExternalDataProcessorObject', 'ExternalReportObject'):
|
||||||
report_warn(f'12. Type "{tv}": External* type in configuration context (use DataProcessorObject/ReportObject instead)')
|
report_error(f'12. Type "{tv}": External* type in configuration context (use DataProcessorObject/ReportObject instead)')
|
||||||
type_warn_count += 1
|
type_invalid += 1
|
||||||
else:
|
else:
|
||||||
report_warn(f'12. Type "{tv}": unrecognized cfg prefix')
|
report_warn(f'12. Type "{tv}": unrecognized cfg prefix')
|
||||||
type_warn_count += 1
|
type_warn_count += 1
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
{ "button": "Выполнить", "command": "Выполнить" }
|
{ "button": "Выполнить", "command": "Выполнить" }
|
||||||
],
|
],
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "name": "Объект", "type": "ExternalDataProcessorObject.Валидация", "main": true },
|
{ "name": "Объект", "type": "DataProcessorObject.Валидация", "main": true },
|
||||||
{ "name": "Поле1", "type": "string" },
|
{ "name": "Поле1", "type": "string" },
|
||||||
{ "name": "Поле2", "type": "decimal(15,2)" },
|
{ "name": "Поле2", "type": "decimal(15,2)" },
|
||||||
{ "name": "Флаг", "type": "boolean" }
|
{ "name": "Флаг", "type": "boolean" }
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@
|
|||||||
<Attributes>
|
<Attributes>
|
||||||
<Attribute name="Объект" id="14">
|
<Attribute name="Объект" id="14">
|
||||||
<Type>
|
<Type>
|
||||||
<v8:Type>cfg:ExternalDataProcessorObject.Валидация</v8:Type>
|
<v8:Type>cfg:DataProcessorObject.Валидация</v8:Type>
|
||||||
</Type>
|
</Type>
|
||||||
<MainAttribute>true</MainAttribute>
|
<MainAttribute>true</MainAttribute>
|
||||||
</Attribute>
|
</Attribute>
|
||||||
|
|||||||
+1
-1
@@ -35,7 +35,7 @@
|
|||||||
<Attributes>
|
<Attributes>
|
||||||
<Attribute name="Объект" id="13">
|
<Attribute name="Объект" id="13">
|
||||||
<Type>
|
<Type>
|
||||||
<v8:Type>cfg:ExternalDataProcessorObject.ВалТабл</v8:Type>
|
<v8:Type>cfg:DataProcessorObject.ВалТабл</v8:Type>
|
||||||
</Type>
|
</Type>
|
||||||
<MainAttribute>true</MainAttribute>
|
<MainAttribute>true</MainAttribute>
|
||||||
</Attribute>
|
</Attribute>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
]}
|
]}
|
||||||
],
|
],
|
||||||
"attributes": [
|
"attributes": [
|
||||||
{ "name": "Объект", "type": "ExternalDataProcessorObject.ВалТабл", "main": true },
|
{ "name": "Объект", "type": "DataProcessorObject.ВалТабл", "main": true },
|
||||||
{ "name": "Данные", "type": "ValueTable", "columns": [
|
{ "name": "Данные", "type": "ValueTable", "columns": [
|
||||||
{ "name": "Наименование", "type": "string(150)" },
|
{ "name": "Наименование", "type": "string(150)" },
|
||||||
{ "name": "Количество", "type": "decimal(10,3)" }
|
{ "name": "Количество", "type": "decimal(10,3)" }
|
||||||
|
|||||||
Reference in New Issue
Block a user